Working on hyprland config
This commit is contained in:
+14
-11
@@ -587,6 +587,13 @@ The ./generated/top.nix file acts as an anchor or entry point for the entire cha
|
||||
|
||||
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 = {
|
||||
@@ -603,17 +610,13 @@ in
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Create all files using home.file
|
||||
home.file = lib.genAttrs hyprlandFiles (name: {
|
||||
target = "/.config/hypr/${name}";
|
||||
source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}";
|
||||
});
|
||||
|
||||
# Create the directory structure
|
||||
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 = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user