fix: customTop/customBottom

This commit is contained in:
Peritia 2026-03-02 11:34:23 +01:00
parent 42b76c5ed3
commit 72ac487c58
3 changed files with 25 additions and 27 deletions

View file

@ -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

View file

@ -17,6 +17,6 @@
./style
# Doesn't work yet:
#./customUser.nix
./customUser.nix
];
}

View file

@ -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"];