From 9ec3aa95c9d952163b5dd8ebc7b23a8b390ee590 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 23 Aug 2024 18:59:49 +0200 Subject: [PATCH] Clean up the Windows configuration --- lib/modules/windows.nix | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/lib/modules/windows.nix b/lib/modules/windows.nix index 3ae9b93d..c480e067 100644 --- a/lib/modules/windows.nix +++ b/lib/modules/windows.nix @@ -7,18 +7,11 @@ types ; - setupUser = config.valhalla.setupUser.name; capitalize = (import ../text.nix { inherit lib; }).capitalize; - - winType = types.submodule ( - { config, ... }: { - options = { - setupUser = mkOption { - type = types.str; - description = "The name of the user for setting up Windows."; - default = capitalize setupUser; - }; - + in { + options = { + valhalla = { + windows = { dualboot = { enable = mkEnableOption "dual boot"; @@ -41,19 +34,13 @@ dynamicLighting = mkEnableOption "dynamic lighting"; adware = mkEnableOption "adware"; # Fuck you for displaying ads on an OS I fricking paid for! }; + }; + }; - config = { - dualboot.linuxPercentage = mkIf (!config.dualboot.enable) 0; - }; - }); - in { - options = { - valhalla = { - windows = mkOption { - type = winType; - description = "The options for setting up Windows."; - default = {}; - }; + config = { + valhalla.windows = { + setupUser.name = capitalize config.valhalla.setupUser.name; + dualboot.linuxPercentage = mkIf (!config.valhalla.windows.dualboot.enable) 0; }; }; }