diff --git a/lib/modules/valhalla.nix b/lib/modules/valhalla.nix index 88edf140..e5d46b21 100644 --- a/lib/modules/valhalla.nix +++ b/lib/modules/valhalla.nix @@ -11,6 +11,7 @@ ./partition.nix ./software.nix ./users.nix + ./windows.nix ]; options = { diff --git a/lib/modules/windows.nix b/lib/modules/windows.nix new file mode 100644 index 00000000..4784c913 --- /dev/null +++ b/lib/modules/windows.nix @@ -0,0 +1,37 @@ +{ lib, ... }: + let + inherit (lib) + mkOption + mkEnableOption + mkIf + types + ; + + winType = types.submodule ( + { config, ... }: { + options = { + dualboot = { + enable = mkEnableOption "dual boot"; + + linuxPercentage = mkOption { + type = types.number; + description = "The percentage of the disk size reserved for Linux."; + }; + }; + }; + + config = { + dualboot.linuxPercentage = mkIf (!config.dualboot.enable) 0; + }; + }); + in { + options = { + valhalla = { + windows = mkOption { + type = winType; + description = "The options for setting up Windows."; + default = {}; + }; + }; + }; + }