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
|
let
|
||||||
hyprlandFiles = builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr");
|
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
|
in
|
||||||
{
|
{
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
@@ -603,17 +610,13 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create all files using home.file
|
# Merge all xdg.configFile definitions
|
||||||
home.file = lib.genAttrs hyprlandFiles (name: {
|
xdg.configFile = otherConfigs // {
|
||||||
target = "/.config/hypr/${name}";
|
"hypr/hyprland.conf".text = ''
|
||||||
source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}";
|
${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
|
"hypr/.keep".text = "";
|
||||||
xdg.configFile = {
|
|
||||||
"hypr/.keep" = {
|
|
||||||
text = "";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user