Regenerated
This commit is contained in:
@@ -9,32 +9,23 @@ let
|
||||
pkgs.hyprland-git or
|
||||
inputs.hyprland.packages.${pkgs.system}.default;
|
||||
|
||||
# Recursively gather all files as Home Manager entries
|
||||
gatherFiles = dir:
|
||||
let
|
||||
entries = builtins.attrNames (builtins.readDir dir);
|
||||
in lib.concatMap (e:
|
||||
let
|
||||
path = "${dir}/${e}";
|
||||
stat = builtins.readDir path;
|
||||
in if stat != {} then gatherFiles path
|
||||
else [{
|
||||
name = ".config/hypr/${builtins.replaceStrings [ "${assetPath}/" ] [ "" ] path}";
|
||||
value = { source = path; };
|
||||
}]
|
||||
) entries;
|
||||
# Lijst van bestanden in ./generated/.config/hypr
|
||||
assetFiles = builtins.filter
|
||||
(f: builtins.pathInfo (assetPath + "/" + f).type == "regular")
|
||||
(builtins.attrNames (builtins.readDir assetPath));
|
||||
|
||||
hyprFilesAttrs = lib.listToAttrs (gatherFiles assetPath);
|
||||
# Home Manager entries voor elk bestand
|
||||
hyprFilesAttrs = lib.listToAttrs (map (f: {
|
||||
name = ".config/hypr/${f}";
|
||||
value = { source = "${assetPath}/${f}"; };
|
||||
}) assetFiles);
|
||||
|
||||
in
|
||||
{
|
||||
# Install Hyprland systemwide
|
||||
environment.systemPackages = [ hyprlandPkg ];
|
||||
|
||||
# Home Manager user configuration
|
||||
home-manager.users = {
|
||||
${username} = {
|
||||
# Ensure all generated files end up in ~/.config/hypr
|
||||
home.file = hyprFilesAttrs;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user