diff --git a/nixosVista/homeManager/hyprland/customUser.nix b/nixosVista/homeManager/hyprland/customUser.nix index e7e0dfb..2fd80d5 100644 --- a/nixosVista/homeManager/hyprland/customUser.nix +++ b/nixosVista/homeManager/hyprland/customUser.nix @@ -4,37 +4,13 @@ nixosVista, ... }: let - cfg = nixosVista.hyprland; + cfg = config.nixosVista.hyprland; in { - ############################################################ - # Options exposed to the user - ############################################################ - - options.nixosVista.hyprland = { - customTop = lib.mkOption { - type = lib.types.lines; - default = ""; - description = '' - Custom Hyprland configuration injected near the top - of the generated config. - ''; - }; - - customBottom = lib.mkOption { - type = lib.types.lines; - default = ""; - description = '' - Custom Hyprland configuration injected at the very bottom - of the generated config. - ''; - }; - }; - ############################################################ # Inject into fragment system ############################################################ - config = lib.mkIf nixosVista.enable { + config = lib.mkIf (config.nixosVista.enable or false) { nixosVista.hyprland.fragments.customTop = lib.mkIf (cfg.customTop != "") '' ############################################################ # Your Custom User / nixosVista.hyprland.customTop diff --git a/nixosVista/homeManager/hyprland/default.nix b/nixosVista/homeManager/hyprland/default.nix index 3ec839c..2fca4b7 100644 --- a/nixosVista/homeManager/hyprland/default.nix +++ b/nixosVista/homeManager/hyprland/default.nix @@ -17,6 +17,6 @@ ./style # Doesn't work yet: - #./customUser.nix + ./customUser.nix ]; } diff --git a/nixosVista/options.nix b/nixosVista/options.nix index 706acbf..57d7c1d 100644 --- a/nixosVista/options.nix +++ b/nixosVista/options.nix @@ -212,6 +212,28 @@ with lib; { }; }; + ############################################################ + # Hyprland user injection + ############################################################ + + hyprland.customTop = mkOption { + type = types.lines; + default = ""; + description = '' + Custom Hyprland configuration injected near the top + of the generated config. + ''; + }; + + hyprland.customBottom = mkOption { + type = types.lines; + default = ""; + description = '' + Custom Hyprland configuration injected at the very bottom + of the generated config. + ''; + }; + hyprland.startup = { preset = mkOption { type = types.enum ["default" "minimal" "none"];