···10nix flake update den
11```
1213-- Run checks to test everything works.
0000001415```console
16-nix flake check
17```
18-19-- Edit [modules/hosts.nix](modules/hosts.nix)
···10nix flake update den
11```
1213+- Edit [modules/hosts.nix](modules/hosts.nix)
14+15+- Run the VM
16+17+We recommend to use a VM develop cycle so you can play with the system before applying to your hardware.
18+19+See [modules/vm.nix](modules/vm.nix)
2021```console
22+nix run .#vm
23```
00
+12-4
templates/default/modules/vm.nix
···1# enables `nix run .#vm`. it is very useful to have a VM
2# you can edit your config and launch the VM to test stuff
3# instead of having to reboot each time.
4-{ inputs, ... }:
5{
00006 perSystem =
7 { pkgs, ... }:
8 {
9 packages.vm = pkgs.writeShellApplication {
10 name = "vm";
11- text = ''
12- ${inputs.self.nixosConfigurations.igloo.config.system.build.vm}/bin/run-igloo-vm "$@"
13- '';
000014 };
15 };
16}
···1# enables `nix run .#vm`. it is very useful to have a VM
2# you can edit your config and launch the VM to test stuff
3# instead of having to reboot each time.
4+{ inputs, den, ... }:
5{
6+7+ # USER TODO: remove this tty-autologin used for the VM
8+ den.aspects.igloo.includes = [ (den.provides.tty-autologin "tux") ];
9+10 perSystem =
11 { pkgs, ... }:
12 {
13 packages.vm = pkgs.writeShellApplication {
14 name = "vm";
15+ text =
16+ let
17+ host = inputs.self.nixosConfigurations.igloo.config;
18+ in
19+ ''
20+ ${host.system.build.vm}/bin/run-${host.networking.hostName}-vm "$@"
21+ '';
22 };
23 };
24}