diff --git a/options/custom/default.nix b/options/custom/default.nix index 8483fdb..d798299 100644 --- a/options/custom/default.nix +++ b/options/custom/default.nix @@ -36,6 +36,13 @@ in { rounding = mkOption {default = 15;}; ### Misc + desktop = mkOption { + default = + if config.custom.full + then "niri" + else "gnome"; + }; + lockscreen = mkOption {default = "hyprlock";}; wallpaper = mkOption {default = false;}; diff --git a/options/custom/desktops/default.nix b/options/custom/desktops/default.nix index b2e188f..b695905 100644 --- a/options/custom/desktops/default.nix +++ b/options/custom/desktops/default.nix @@ -8,22 +8,15 @@ with lib; let in { options.custom.desktops = { enable = mkOption {default = config.custom.minimal;}; - - desktop = mkOption { - default = - if config.custom.full - then "niri" - else "gnome"; - }; }; config = mkIf cfg.enable { custom.desktops = { - gnome.enable = cfg.desktop == "gnome"; - hyprland.enable = cfg.desktop == "hyprland"; - kde.enable = cfg.desktop == "kde"; - niri.enable = cfg.desktop == "niri"; - sway.enable = cfg.desktop == "sway"; + gnome.enable = config.custom.desktop == "gnome"; + hyprland.enable = config.custom.desktop == "hyprland"; + kde.enable = config.custom.desktop == "kde"; + niri.enable = config.custom.desktop == "niri"; + sway.enable = config.custom.desktop == "sway"; }; }; } diff --git a/options/custom/programs/waybar/default.nix b/options/custom/programs/waybar/default.nix index 689493f..0a9eade 100644 --- a/options/custom/programs/waybar/default.nix +++ b/options/custom/programs/waybar/default.nix @@ -40,7 +40,6 @@ with lib; let in { options.custom.programs.waybar = { enable = mkOption {default = false;}; - desktop = mkOption {default = config.custom.desktops.desktop;}; }; config = mkIf cfg.enable { @@ -98,12 +97,12 @@ in { smooth-scrolling-threshold = 2; on-scroll-down = - if cfg.desktop == "niri" + if config.custom.desktop == "niri" then "${niri} msg action focus-workspace-down" else ""; on-scroll-up = - if cfg.desktop == "niri" + if config.custom.desktop == "niri" then "${niri} msg action focus-workspace-up" else ""; }; @@ -302,7 +301,7 @@ in { #// on-click = ""; on-click-middle = - if cfg.desktop == "niri" + if config.custom.desktop == "niri" then ''${niri} msg action close-window --id "$(${niri} msg -j windows | ${jq} '.[] | select(.app_id == "YouTube Music").id')"'' else "";