Files
2026-03-23 16:18:38 +00:00

48 lines
1.4 KiB
Nix

{
config,
pkgs,
lib,
user,
flakeRoot,
...
}:
let
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
{
programs.hyprland = {
enable = true;
};
home-manager.users.${user.username} = {
home.stateVersion = "25.11";
home.username = user.username;
home.homeDirectory =
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
wayland.windowManager.hyprland = {
enable = true;
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
};
#wayland.windowManager.hyprland.settings.general."col.active_border" = lib.mkForce "0xffffffff";
# Merge all xdg.configFile definitions
xdg.configFile = otherConfigs // {
"hypr/hyprland.conf".text = ''
${builtins.readFile "${flakeRoot}/assets/hyprland/conf/hypr/hyprland.conf"}
# Your manual settings will go below this line and will not be overwritten:
'';
"hypr/.keep".text = "";
};
};
}