-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
137 lines (128 loc) · 3.23 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
description = "My NixOS setups";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
ghostty.url = "github:ghostty-org/ghostty?ref=v1.1.2";
};
outputs = {
self,
nixpkgs,
lix-module,
home-manager,
neorg-overlay,
ghostty,
...
} @ inputs: let
usernames = [
# add a user here to create a separate account that is identical in terms of configuration
# default password will be changeme
"f4z3r"
];
default_user = "f4z3r";
theme = "dark"; # one of "light" or "dark"
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
inherit (nixpkgs) lib;
pkgs-custom = {
};
inherit (pkgs) stdenv;
setup = {
hostname,
font_size,
resolution,
scale,
brain_backup,
main_monitor,
monitor_prefix,
monitoring,
}:
lib.nixosSystem {
inherit system;
specialArgs = {
inherit
system
pkgs-custom
theme
hostname
usernames
default_user
brain_backup
main_monitor
monitor_prefix
monitoring
;
};
modules = [
lix-module.nixosModules.default
./configuration.nix
home-manager.nixosModules.home-manager
{
environment.systemPackages = [
ghostty.packages.x86_64-linux.default
];
nixpkgs.overlays = [
neorg-overlay.overlays.default
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users =
lib.attrsets.genAttrs
usernames (user:
import ./home/home.nix {
inherit
pkgs
lib
stdenv
pkgs-custom
theme
font_size
resolution
scale
main_monitor
monitor_prefix
;
username = user;
});
};
}
];
};
in {
nixosConfigurations = {
"revenge-nix" = setup {
hostname = "revenge-nix";
font_size = 11;
resolution = "3840x2160";
scale = 2;
brain_backup = true;
# potential update to these when using nvidia sync
main_monitor = "eDP-1";
monitor_prefix = "DP";
monitoring = true;
};
"nix" = setup {
hostname = "nix";
font_size = 11;
resolution = "1920x1200";
scale = 1;
brain_backup = true;
main_monitor = "eDP-1";
monitor_prefix = "DP";
monitoring = false;
};
};
};
}