Regenerated
This commit is contained in:
@@ -4,14 +4,13 @@ let
|
||||
username = config.defaultUser or "henrov";
|
||||
assetPath = "${flakeRoot}/generated/.config/hypr";
|
||||
|
||||
# Determine Hyprland package (systemwide installation is enough)
|
||||
hyprlandPkg =
|
||||
pkgs.hyprland or
|
||||
pkgs.hyprland-git or
|
||||
inputs.hyprland.packages.${pkgs.system}.default;
|
||||
|
||||
# Recursively read directory and generate Home Manager file entries
|
||||
rec readDirRecursive = dir:
|
||||
readDirRecursive = dir:
|
||||
let
|
||||
entries = builtins.attrNames (builtins.readDir dir);
|
||||
files = lib.concatMap (e:
|
||||
@@ -21,26 +20,20 @@ let
|
||||
in if stat.type == "directory"
|
||||
then readDirRecursive path
|
||||
else [{
|
||||
# Destination path relative to home directory
|
||||
name = ".config/hypr/${builtins.substring (builtins.stringLength assetPath + 1) (builtins.stringLength path - (builtins.stringLength assetPath + 1)) path}";
|
||||
value = { source = path; };
|
||||
}]
|
||||
) entries;
|
||||
in files;
|
||||
|
||||
# Convert list to attribute set (no mkMerge needed)
|
||||
hyprFilesAttrs = lib.listToAttrs (readDirRecursive assetPath);
|
||||
|
||||
in
|
||||
{
|
||||
# Systemwide installation
|
||||
environment.systemPackages = [ hyprlandPkg ];
|
||||
|
||||
# Home Manager users declaration
|
||||
home-manager.users = {
|
||||
${username} = {
|
||||
|
||||
# Directly define all config files in ~/.config/hypr/
|
||||
home.file = hyprFilesAttrs;
|
||||
|
||||
# Optional Hyprland settings
|
||||
|
||||
Reference in New Issue
Block a user