Add options for setting up windows

This commit is contained in:
Manuel Thalmann 2024-07-28 01:56:41 +02:00
parent 1fb8c556e6
commit 3063ad189d
2 changed files with 38 additions and 0 deletions

View file

@ -11,6 +11,7 @@
./partition.nix
./software.nix
./users.nix
./windows.nix
];
options = {

37
lib/modules/windows.nix Normal file
View file

@ -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 = {};
};
};
};
}