Files
lux-old/modules/vm.nix
2026-02-28 14:18:57 +01:00

25 lines
652 B
Nix

# enables `nix run .#vm`. it is very useful to have a VM
# you can edit your config and launch the VM to test stuff
# instead of having to reboot each time.
{ inputs, den, ... }:
{
# USER TODO: remove this tty-autologin used for the VM
den.aspects.igloo.includes = [ (den.provides.tty-autologin "tux") ];
perSystem =
{ pkgs, ... }:
{
packages.vm = pkgs.writeShellApplication {
name = "vm";
text =
let
host = inputs.self.nixosConfigurations.igloo.config;
in
''
${host.system.build.vm}/bin/run-${host.networking.hostName}-vm "$@"
'';
};
};
}