diff options
-rw-r--r-- | flake.nix | 118 |
1 files changed, 33 insertions, 85 deletions
@@ -115,88 +115,6 @@ | |||
115 | }; | 115 | }; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | nixosConfigurations = { | ||
119 | testDefault = nixpkgs.lib.nixosSystem { | ||
120 | system = "x86_64-linux"; | ||
121 | modules = [ | ||
122 | self.nixosModules.test | ||
123 | ]; | ||
124 | }; | ||
125 | |||
126 | testPlainDesktop = nixpkgs.lib.nixosSystem { | ||
127 | system = "x86_64-linux"; | ||
128 | modules = [ | ||
129 | self.nixosModules.test | ||
130 | self.nixosModules.profiles.desktop | ||
131 | |||
132 | ({ modulesPath, ... }: { | ||
133 | imports = [ | ||
134 | (modulesPath + "/virtualisation/qemu-vm.nix") | ||
135 | ]; | ||
136 | |||
137 | virtualisation.memorySize = 1024; | ||
138 | virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ]; | ||
139 | }) | ||
140 | ]; | ||
141 | }; | ||
142 | |||
143 | testFullDesktop = nixpkgs.lib.nixosSystem { | ||
144 | system = "x86_64-linux"; | ||
145 | modules = [ | ||
146 | self.nixosModules.test | ||
147 | self.nixosModules.profiles.desktop | ||
148 | self.nixosModules.usecases.desktop.development | ||
149 | self.nixosModules.usecases.desktop.music | ||
150 | self.nixosModules.usecases.desktop.graphical.audioProduction | ||
151 | self.nixosModules.usecases.desktop.graphical.gaming | ||
152 | self.nixosModules.usecases.desktop.graphical.imageManipulation | ||
153 | self.nixosModules.usecases.desktop.graphical.kodi | ||
154 | |||
155 | ({ modulesPath, ... }: { | ||
156 | imports = [ | ||
157 | (modulesPath + "/virtualisation/qemu-vm.nix") | ||
158 | ]; | ||
159 | |||
160 | home-manager.users.minijackson.programs.beets.settings.acoustid.apikey = "0000000000"; | ||
161 | |||
162 | virtualisation.memorySize = 2048; | ||
163 | virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ]; | ||
164 | }) | ||
165 | ]; | ||
166 | }; | ||
167 | |||
168 | testServer = nixpkgs.lib.nixosSystem { | ||
169 | system = "x86_64-linux"; | ||
170 | modules = [ | ||
171 | self.nixosModules.test | ||
172 | self.nixosModules.profiles.server | ||
173 | ]; | ||
174 | }; | ||
175 | |||
176 | iso = nixpkgs.lib.nixosSystem { | ||
177 | system = "x86_64-linux"; | ||
178 | modules = [ | ||
179 | self.nixosModules.default | ||
180 | ({ modulesPath, ... }: { | ||
181 | imports = [ | ||
182 | (modulesPath + "/installer/cd-dvd/installation-cd-base.nix") | ||
183 | ]; | ||
184 | |||
185 | environment.etc.nixos-config-reborn.source = toString self; | ||
186 | |||
187 | isoImage.makeEfiBootable = true; | ||
188 | isoImage.makeUsbBootable = true; | ||
189 | |||
190 | home-manager.users.minijackson.home.stateVersion = "21.05"; | ||
191 | home-manager.users.root.home.stateVersion = "21.05"; | ||
192 | |||
193 | users.users.minijackson.initialHashedPassword = ""; | ||
194 | users.users.root.initialHashedPassword = ""; | ||
195 | }) | ||
196 | ]; | ||
197 | }; | ||
198 | }; | ||
199 | |||
200 | templates = { | 118 | templates = { |
201 | desktop = { | 119 | desktop = { |
202 | path = ./templates/desktop; | 120 | path = ./templates/desktop; |
@@ -208,9 +126,15 @@ | |||
208 | 126 | ||
209 | hydraJobs = | 127 | hydraJobs = |
210 | let | 128 | let |
211 | # Use the nixpkgs configuration of the testDefault machine, so that it | 129 | # Use the nixpkgs configuration of a test machine, so that it |
212 | # contains the list of allowed unfree packages | 130 | # contains the list of allowed unfree packages |
213 | nixpkgsConfig = self.nixosConfigurations.testDefault.config.nixpkgs.config; | 131 | nixpkgsConfig = let |
132 | testConfiguration = nixpkgs.lib.nixosSystem { | ||
133 | system = "x86_64-linux"; | ||
134 | modules = [ self.nixosModules.test ]; | ||
135 | }; | ||
136 | in | ||
137 | testConfiguration.config.nixpkgs.config; | ||
214 | pkgs = import nixpkgs { system = "x86_64-linux"; config = nixpkgsConfig; }; | 138 | pkgs = import nixpkgs { system = "x86_64-linux"; config = nixpkgsConfig; }; |
215 | inherit (pkgs) nixosTest; | 139 | inherit (pkgs) nixosTest; |
216 | in | 140 | in |
@@ -312,7 +236,31 @@ | |||
312 | ''; | 236 | ''; |
313 | }; | 237 | }; |
314 | 238 | ||
315 | isoImage.x86_64-linux = self.nixosConfigurations.iso.config.system.build.isoImage; | 239 | isoImage.x86_64-linux = let |
240 | isoSystem = nixpkgs.lib.nixosSystem { | ||
241 | system = "x86_64-linux"; | ||
242 | modules = [ | ||
243 | self.nixosModules.default | ||
244 | ({ modulesPath, ... }: { | ||
245 | imports = [ | ||
246 | (modulesPath + "/installer/cd-dvd/installation-cd-base.nix") | ||
247 | ]; | ||
248 | |||
249 | environment.etc.nixos-config-reborn.source = toString self; | ||
250 | |||
251 | isoImage.makeEfiBootable = true; | ||
252 | isoImage.makeUsbBootable = true; | ||
253 | |||
254 | home-manager.users.minijackson.home.stateVersion = "21.05"; | ||
255 | home-manager.users.root.home.stateVersion = "21.05"; | ||
256 | |||
257 | users.users.minijackson.initialHashedPassword = ""; | ||
258 | users.users.root.initialHashedPassword = ""; | ||
259 | }) | ||
260 | ]; | ||
261 | }; | ||
262 | in | ||
263 | isoSystem.config.system.build.isoImage; | ||
316 | }; | 264 | }; |
317 | 265 | ||
318 | }; | 266 | }; |