Regenerated

This commit is contained in:
2026-03-30 00:08:50 +00:00
parent c918e2942e
commit ce0828077e
3 changed files with 348 additions and 339 deletions
+20 -17
View File
@@ -1822,24 +1822,28 @@ Setting up Hyprland
let
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/hypr/";
assetPath = "${flakeRoot}/generated/.config/hypr";
# Read all files in the asset directory
assetFiles = builtins.attrNames (builtins.readDir assetPath);
# Recursively read directory and generate Home Manager file entries
rec readDirRecursive = dir:
let
entries = builtins.attrNames (builtins.readDir dir);
files = lib.concatMap (e:
let
path = "${dir}/${e}";
stat = builtins.pathInfo path;
in if stat.type == "directory"
then readDirRecursive path
else [{
# Destination path relative to home directory
name = builtins.replaceStrings [ "${flakeRoot}/generated/" ] [ "" ] path;
value = { source = path; };
}]
) entries;
in files;
# Convert files to Home Manager xdg config entries
hyprFiles = lib.genAttrs assetFiles (f: {
# Destination path in home directory
name = ".config/hypr/${f}";
# Source file path
value = { source = "${assetPath}/${f}"; };
});
hyprFiles = readDirRecursive assetPath;
# Determine Hyprland package
hyprlandPkg =
pkgs.hyprland or
pkgs.hyprland-git or
inputs.hyprland.packages.${pkgs.system}.default;
in
{
environment.systemPackages = [ hyprlandPkg ];
@@ -1847,9 +1851,8 @@ in
# Home Manager users declaration
home-manager.users = {
${username} = {
home.packages = [ hyprlandPkg ];
# Merge all files in the asset folder into ~/.config/hypr/
# Merge all files (including subdirectories) into ~/.config/hypr/
home.file = lib.mkMerge hyprFiles;
# Optional: Hyprland settings