diff --git a/Droidnix/generated/hyprland/hyprland.nix b/Droidnix/generated/hyprland/hyprland.nix index 4f102cf2e..c6249dc00 100644 --- a/Droidnix/generated/hyprland/hyprland.nix +++ b/Droidnix/generated/hyprland/hyprland.nix @@ -11,6 +11,11 @@ let hyprlandFiles = builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr"); # Filter out hyprland.conf from the list of files to symlink otherHyprlandFiles = lib.filter (name: name != "hyprland.conf") hyprlandFiles; + # Generate xdg.configFile entries for all files except hyprland.conf + otherConfigs = lib.genAttrs otherHyprlandFiles (name: { + target = "hypr/${name}"; + source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}"; + }); in { programs.hyprland = { @@ -27,19 +32,13 @@ in enable = true; }; - # Symlink all files except hyprland.conf - xdg.configFile = lib.genAttrs otherHyprlandFiles (name: { - target = "hypr/${name}"; - source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}"; - }); - - # Append the base config to hyprland.conf, preserving manual changes - xdg.configFile."hypr/hyprland.conf".text = '' - ${builtins.readFile "${flakeRoot}/assets/hyprland/conf/hypr/hyprland.conf"} - # Your manual settings will go below this line and will not be overwritten - ''; - - # Create the directory structure (optional, if not already created) - xdg.configFile."hypr/.keep".text = ""; + # Merge all xdg.configFile definitions + xdg.configFile = otherConfigs // { + "hypr/hyprland.conf".text = '' + ${builtins.readFile "${flakeRoot}/assets/hyprland/conf/hypr/hyprland.conf"} + # Your manual settings will go below this line and will not be overwritten + ''; + "hypr/.keep".text = ""; + }; }; }