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