47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ lib, config, pkgs, inputs, ... }:
|
|
|
|
let
|
|
username = config.defaultUser or "henrov";
|
|
|
|
# Paths
|
|
assetPath = ../../../assets/hyprland/conf/hypr;
|
|
mainConfig = "${assetPath}/hyprland.conf";
|
|
|
|
# Determine Hyprland package with fallbacks
|
|
hyprlandPkg =
|
|
pkgs.hyprland or
|
|
pkgs.hyprland-git or
|
|
inputs.hyprland.packages.${pkgs.system}.default;
|
|
|
|
# Map all files in the asset folder to home.file entries
|
|
hyprFiles =
|
|
builtins.listToAttrs (
|
|
map (f: {
|
|
name = ".config/hypr/${f}";
|
|
value = { source = "${assetPath}/${f}"; };
|
|
}) (builtins.attrNames (builtins.readDir assetPath))
|
|
);
|
|
in
|
|
{
|
|
# System-wide package
|
|
environment.systemPackages = [ hyprlandPkg ];
|
|
|
|
# Home Manager user settings
|
|
_module.args.hmUsers = {
|
|
${username} = {
|
|
home.packages = [ hyprlandPkg ];
|
|
|
|
# Main config (redundant if also in the folder, but keeps explicit)
|
|
home.file.".config/hypr/hyprland.conf".source = mainConfig;
|
|
|
|
# Add all other files from asset folder
|
|
home.file = lib.mkMerge [
|
|
hyprFiles
|
|
];
|
|
|
|
# Optional module-specific settings
|
|
settings.general."col.active_border" = "0xff97cbcd 0xff89b4fa";
|
|
};
|
|
};
|
|
}
|