This commit is contained in:
kenji
2025-12-12 11:29:10 -06:00
parent 4f5b41204c
commit 5535d43146
+13 -3
View File
@@ -31,9 +31,11 @@ in {
}; };
home.file = lib.mkMerge [ home.file = lib.mkMerge [
(lib.mkIf cfg.settings.hyprland.useNixForConf { # The home.file configuration is now split into two mutually exclusive blocks.
home.file = let (lib.mkIf cfg.settings.hyprland.useNixForConf (
let
scriptDir = ../../.config/hypr/hyprland/scripts; scriptDir = ../../.config/hypr/hyprland/scripts;
# List only the files that need to be executable
scripts = [ scripts = [
"fuzzel-emoji.sh" "fuzzel-emoji.sh"
"launch_first_available.sh" "launch_first_available.sh"
@@ -43,13 +45,21 @@ in {
"zoom.sh" "zoom.sh"
]; ];
in in
# 1. Map the individual scripts with executable = true
(
lib.genAttrs lib.genAttrs
(map (name: ".config/hypr/scripts/${name}") scripts) (map (name: ".config/hypr/scripts/${name}") scripts)
(path: { (path: {
source = "${scriptDir}/${builtins.baseNameOf path}"; source = "${scriptDir}/${builtins.baseNameOf path}";
executable = true; executable = true;
});
}) })
)
# 2. Add the 'ai' directory separately (cannot use executable=true on dirs)
// {
".config/hypr/scripts/ai".source = "${scriptDir}/ai";
}
))
(lib.mkIf (!cfg.settings.hyprland.useNixForConf) { (lib.mkIf (!cfg.settings.hyprland.useNixForConf) {
".config/hypr" = { ".config/hypr" = {
source = builtins.path { source = builtins.path {