diff --git a/hosts/vm/default.nix b/hosts/vm/default.nix index bb31c4f..a04732e 100644 --- a/hosts/vm/default.nix +++ b/hosts/vm/default.nix @@ -24,5 +24,5 @@ # drivers.nvidia.enable = false; # drivers.nvidia-prime.enable = false; # drivers.intel.enable = false; - vm.guest-services.enable = true; + modules.vm.guestServices.enable = true; } diff --git a/modules/core/boot.nix b/modules/core/boot.nix index c28f3c4..ee4e837 100644 --- a/modules/core/boot.nix +++ b/modules/core/boot.nix @@ -7,7 +7,7 @@ loader.systemd-boot = { enable = true; configurationLimit = 10; - consoleMode = config.system.systemdBootConsoleMode; + consoleMode = config.modules.system.systemdBootConsoleMode; }; loader.efi.canTouchEfiVariables = true; }; diff --git a/modules/core/system.nix b/modules/core/system.nix index e6b9155..a998a30 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -3,7 +3,7 @@ ... }: let - cfg = config.system; + cfg = config.modules.system; in { nix = { diff --git a/modules/drivers/vm-guest-services.nix b/modules/drivers/vm-guest-services.nix index 6284a13..175f5e0 100644 --- a/modules/drivers/vm-guest-services.nix +++ b/modules/drivers/vm-guest-services.nix @@ -5,13 +5,9 @@ }: with lib; let - cfg = config.vm.guest-services; + cfg = config.modules.vm.guestServices; in { - options.vm.guest-services = { - enable = mkEnableOption "Enable Virtual Machine Guest Services"; - }; - config = mkIf cfg.enable { services.qemuGuest.enable = true; services.spice-vdagentd.enable = true; diff --git a/modules/options/default.nix b/modules/options/default.nix index 0469250..572fda7 100644 --- a/modules/options/default.nix +++ b/modules/options/default.nix @@ -15,6 +15,7 @@ ./shell.nix ./system.nix ./tailscale.nix + ./vm.nix ./zsh.nix ]; } diff --git a/modules/options/system.nix b/modules/options/system.nix index 0c7fc2d..5ab74b3 100644 --- a/modules/options/system.nix +++ b/modules/options/system.nix @@ -4,7 +4,7 @@ }: with lib; { - options.system = { + options.modules.system = { locale = mkOption { type = types.str; default = "en_US.UTF-8"; diff --git a/modules/options/vm.nix b/modules/options/vm.nix new file mode 100644 index 0000000..c6a532a --- /dev/null +++ b/modules/options/vm.nix @@ -0,0 +1,12 @@ +{ + lib, + ... +}: +with lib; +{ + options.modules.vm = { + guestServices = { + enable = mkEnableOption "Virtual Machine guest services"; + }; + }; +}