Files
nixos/Droidnix/generated/modules/desktop/hyprland.nix
T
2026-03-23 12:06:04 +00:00

47 lines
1.1 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
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 ];
# Merge main config + all other files
home.file = lib.mkMerge [
hyprFiles
{
".config/hypr/hyprland.conf" = { source = mainConfig; };
}
];
# Optional module-specific settings
settings.general."col.active_border" = "0xff97cbcd 0xff89b4fa";
};
};
}