-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
224 lines (201 loc) · 7.19 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
{
description = "The dasj-lab flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
inputs.sops-nix.url = "github:Mic92/sops-nix";
inputs.sops-nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.stylix.url = "github:danth/stylix";
inputs.stylix.inputs.nixpkgs.follows = "nixpkgs";
inputs.stylix.inputs.home-manager.follows = "home-manager";
inputs.stylix.inputs.flake-compat.follows = "flake-compat";
inputs.stylix.inputs.systems.follows = "systems";
inputs.stylix.inputs.flake-utils.follows = "flake-utils";
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware";
inputs.simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master";
inputs.simple-nixos-mailserver.inputs.nixpkgs.follows = "nixpkgs";
inputs.simple-nixos-mailserver.inputs.flake-compat.follows = "flake-compat";
inputs.home-manager.url = "github:nix-community/home-manager";
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
inputs.nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-vscode-extensions.inputs.flake-compat.follows = "flake-compat";
inputs.nix-vscode-extensions.inputs.flake-utils.follows = "flake-utils";
inputs.vscode-server.url = "github:nix-community/nixos-vscode-server";
inputs.vscode-server.inputs.nixpkgs.follows = "nixpkgs";
inputs.vscode-server.inputs.flake-utils.follows = "flake-utils";
inputs.systems.url = "github:nix-systems/x86_64-linux";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.flake-utils.inputs.systems.follows = "systems";
#inputs.nixos-generators.url = "github:nix-community/nixos-generators";
#inputs.nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
outputs = {
self,
nixpkgs,
nixos-hardware,
nix-vscode-extensions,
sops-nix,
simple-nixos-mailserver,
stylix,
home-manager,
vscode-server,
...
}:
let
gitSecrets = builtins.fromJSON(builtins.readFile "${self}/secrets/git-secrets.json");
sopsSecrets = ./secrets/variables.yaml;
in
{
nixosConfigurations.contabo2 = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit gitSecrets;
inherit sopsSecrets;
};
system = "x86_64-linux";
modules = [
./machines/contabo2/configuration.nix
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
#nixos-hardware.nixosModules.lenovo-thinkpad
simple-nixos-mailserver.nixosModule
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daniel = import ./home/server.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = {
inherit gitSecrets;
};
}
];
};
nixosConfigurations.t500libre = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit gitSecrets;
inherit sopsSecrets;
};
system = "x86_64-linux";
modules = [
./machines/t500libre/configuration.nix
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
nixos-hardware.nixosModules.lenovo-thinkpad
simple-nixos-mailserver.nixosModule
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daniel = import ./home/server.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = {
inherit gitSecrets;
};
}
];
};
nixosConfigurations.xps13-9310 = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit gitSecrets;
inherit sopsSecrets;
};
system = "x86_64-linux";
modules = [
./machines/xps13-9310/configuration.nix
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
nixos-hardware.nixosModules.dell-xps-13-9310
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daniel = import ./home/work.nix;
home-manager.extraSpecialArgs = {
inherit gitSecrets;
};
}
# Extend nixpkgs with VSCode extensions.
{
nixpkgs.overlays = [
nix-vscode-extensions.overlays.default # Also have a look at https://github.com/nix-community/nix-vscode-extensions/issues/29
];
}
];
};
nixosConfigurations.xps13-9380 = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit gitSecrets;
inherit sopsSecrets;
};
system = "x86_64-linux";
modules = [
./machines/xps13-9380/configuration.nix
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
nixos-hardware.nixosModules.dell-xps-13-9380
# These are not yet used by the xps13-9380 machine.
vscode-server.nixosModules.default
({ config, pkgs, ... }: {
services.vscode-server.enable = true;
services.vscode-server.enableFHS = true;
})
# Extend nixpkgs with VSCode extensions.
{
nixpkgs.overlays = [
nix-vscode-extensions.overlays.default # Also have a look at https://github.com/nix-community/nix-vscode-extensions/issues/29
];
}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daniel = import ./home/laptop.nix;
home-manager.extraSpecialArgs = {
inherit gitSecrets;
};
}
];
};
nixosConfigurations.tuxedo-xa15 = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit gitSecrets;
inherit sopsSecrets;
};
system = "x86_64-linux";
modules = [
./machines/tuxedo-xa15/configuration.nix
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
#nixos-hardware.nixosModules.tuxedo-xa15 # does not exist yet.
# Extend nixpkgs with VSCode extensions.
{
nixpkgs.overlays = [
nix-vscode-extensions.overlays.default # Also have a look at https://github.com/nix-community/nix-vscode-extensions/issues/29
];
}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daniel = import ./home/laptop.nix;
home-manager.extraSpecialArgs = {
inherit gitSecrets;
};
}
];
};
nixosConfigurations.cm4-nas = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit gitSecrets;
inherit sopsSecrets;
};
system = "aarch64-linux";
modules = [
./machines/cm4-nas/configuration.nix
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
];
};
};
}