39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ lib, config, pkgs, flakeRoot, home-manager, inputs, ... }:
|
|
|
|
let
|
|
username = config.defaultUser or "henrov";
|
|
assetPath = "${flakeRoot}/assets/traveldroid/conf/hypr/";
|
|
|
|
# Read all files in the asset directory
|
|
assetFiles = builtins.attrNames (builtins.readDir assetPath);
|
|
|
|
# Convert files to Home Manager xdg config entries
|
|
hyprFiles = lib.genAttrs assetFiles (f: {
|
|
# Destination path in home directory
|
|
name = ".config/hypr/${f}";
|
|
# Source file path
|
|
value = { source = "${assetPath}/${f}"; };
|
|
});
|
|
|
|
# Determine Hyprland package
|
|
hyprlandPkg =
|
|
pkgs.hyprland or
|
|
pkgs.hyprland-git or
|
|
inputs.hyprland.packages.${pkgs.system}.default;
|
|
in
|
|
{
|
|
environment.systemPackages = [ hyprlandPkg ];
|
|
|
|
_module.args.hmUsers = {
|
|
${username} = {
|
|
home.packages = [ hyprlandPkg ];
|
|
|
|
# Merge all files in the asset folder into ~/.config/hypr/
|
|
home.file = lib.mkMerge hyprFiles;
|
|
|
|
# Optional: Hyprland settings
|
|
settings.general."col.active_border" = "0xff97cbcd 0xff89b4fa";
|
|
};
|
|
};
|
|
}
|