PortValhalla/lib/modules/windows.nix

38 lines
779 B
Nix
Raw Normal View History

2024-07-27 23:56:41 +00:00
{ 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 = {};
};
};
};
}