2024-08-08 13:28:29 +00:00
|
|
|
{ lib, config, ... }:
|
2024-07-27 23:56:41 +00:00
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mkOption
|
|
|
|
mkEnableOption
|
|
|
|
mkIf
|
|
|
|
types
|
|
|
|
;
|
|
|
|
|
2024-08-08 02:45:27 +00:00
|
|
|
setupUser = config.valhalla.setupUser.name;
|
2024-08-08 13:28:29 +00:00
|
|
|
capitalize = (import ../text.nix { inherit lib; }).capitalize;
|
2024-08-06 09:39:05 +00:00
|
|
|
|
2024-07-27 23:56:41 +00:00
|
|
|
winType = types.submodule (
|
|
|
|
{ config, ... }: {
|
|
|
|
options = {
|
2024-08-06 09:39:05 +00:00
|
|
|
setupUser = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "The name of the user for setting up Windows.";
|
2024-08-08 02:45:27 +00:00
|
|
|
default = capitalize setupUser;
|
|
|
|
};
|
|
|
|
|
2024-07-27 23:56:41 +00:00
|
|
|
dualboot = {
|
|
|
|
enable = mkEnableOption "dual boot";
|
|
|
|
|
|
|
|
linuxPercentage = mkOption {
|
|
|
|
type = types.number;
|
|
|
|
description = "The percentage of the disk size reserved for Linux.";
|
|
|
|
};
|
|
|
|
};
|
2024-08-05 17:12:59 +00:00
|
|
|
|
2024-08-05 21:22:22 +00:00
|
|
|
showFileExt = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = "A value indicating whether file extensions should be displayed in Windows Explorer.";
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
2024-08-05 17:12:59 +00:00
|
|
|
legacyIconSpacing = mkEnableOption "legacy icon spacing" // {
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
dynamicLighting = mkEnableOption "dynamic lighting";
|
|
|
|
adware = mkEnableOption "adware"; # Fuck you for displaying ads on an OS I fricking paid for!
|
2024-07-27 23:56:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
dualboot.linuxPercentage = mkIf (!config.dualboot.enable) 0;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
valhalla = {
|
|
|
|
windows = mkOption {
|
|
|
|
type = winType;
|
|
|
|
description = "The options for setting up Windows.";
|
|
|
|
default = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|