{ 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"; }; xdg.configFile = otherConfigs // { "hypr/hyprland.conf".text = '' ${builtins.readFile "${flakeRoot}/assets/hyprland/conf/hypr/hyprland.conf"} ''; "hypr/.keep".text = ""; }; }; }