27 lines
901 B
Nix
27 lines
901 B
Nix
{ config, pkgs, lib, user, flakeRoot, ... }:
|
|
let
|
|
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
|
|
# Get a list of all files in the conf directory
|
|
hyprlandConfs = lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf")) (name: {
|
|
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}";
|
|
});
|
|
in
|
|
{
|
|
|
|
# Hyprland-specific Home Manager configurations
|
|
home-manager.users.${user.username} = {
|
|
home.stateVersion = userConfig.stateVersion;
|
|
home.username = userConfig.username;
|
|
home.homeDirectory = userConfig.homeDirectory;
|
|
xdg.configFile."hypr/hyprland.conf".text = hyprlandConf;
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
};
|
|
};
|
|
|
|
# Dynamically deploy all files in assets/hyprland/conf/
|
|
xdg.configFile = hyprlandConfs // {
|
|
inherit hyprlandConfigDir;
|
|
};
|
|
}
|