35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ lib, config, pkgs, inputs, ... }:
|
|
|
|
let
|
|
username = config.defaultUser or "henrov";
|
|
assetPath = ../../../assets/hyprland/conf/hypr;
|
|
mainConfig = "${assetPath}/hyprland.conf";
|
|
|
|
# Determine the package: prefer Nixpkgs, fallback to -git, fallback to flake input
|
|
hyprlandPkg =
|
|
pkgs.hyprland or
|
|
pkgs.hyprland-git or
|
|
inputs.hyprland.packages.${pkgs.system}.default;
|
|
in
|
|
{
|
|
# Install Hyprland system-wide
|
|
environment.systemPackages = [ hyprlandPkg ];
|
|
|
|
# Home Manager user settings
|
|
_module.args.hmUsers = {
|
|
${username} = {
|
|
# Ensure Hyprland is also available in the user's environment
|
|
home.packages = [ hyprlandPkg ];
|
|
|
|
# Copy main config into ~/.config/hypr
|
|
home.file.".config/hypr/hyprland.conf".source = mainConfig;
|
|
|
|
# Optional module-specific settings
|
|
settings.general."col.active_border" = "0xff97cbcd 0xff89b4fa";
|
|
|
|
# Optional: add extra configs dynamically from the module's asset folder
|
|
# e.g., all files in assetPath could be mapped automatically if needed
|
|
};
|
|
};
|
|
}
|