33 lines
821 B
Nix
33 lines
821 B
Nix
{ lib, config, pkgs, flakeRoot, home-manager, inputs, ... }:
|
|
|
|
let
|
|
username = config.defaultUser or "henrov";
|
|
assetPath = "${flakeRoot}/generated/.config/hypr";
|
|
|
|
hyprlandPkg =
|
|
pkgs.hyprland or
|
|
pkgs.hyprland-git or
|
|
inputs.hyprland.packages.${pkgs.system}.default;
|
|
|
|
# Lijst van bestanden in ./generated/.config/hypr
|
|
assetFiles = builtins.filter
|
|
(f: builtins.pathInfo (assetPath + "/" + f).type == "regular")
|
|
(builtins.attrNames (builtins.readDir assetPath));
|
|
|
|
# Home Manager entries voor elk bestand
|
|
hyprFilesAttrs = lib.listToAttrs (map (f: {
|
|
name = ".config/hypr/${f}";
|
|
value = { source = "${assetPath}/${f}"; };
|
|
}) assetFiles);
|
|
|
|
in
|
|
{
|
|
environment.systemPackages = [ hyprlandPkg ];
|
|
|
|
home-manager.users = {
|
|
${username} = {
|
|
home.file = hyprFilesAttrs;
|
|
};
|
|
};
|
|
}
|