Avoid possible infinite recursion

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-07-16 17:46:58 +03:00
parent df781012fd
commit 566b4e0157
38 changed files with 216 additions and 187 deletions

View File

@@ -1,5 +1,5 @@
{
user ? throw "user argument is required",
username ? throw "username argument is required",
}:
{
config,
@@ -8,17 +8,20 @@
...
}:
let
hmConfig = config.home-manager.users.${user.name};
userConfig = config.users.users.${username};
hmConfig = config.home-manager.users.${username};
in
{
home-manager.users.${user.name} = {
home-manager.users.${username} = {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
font = builtins.head hmConfig.theme.font.monospace.names;
};
home.persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/rofi" ];
home.persistence."/cache${userConfig.home}".directories = [
"${hmConfig.xdg.relativeCacheHome}/rofi"
];
wayland.windowManager.hyprland.settings.bind = [
"$mod, r, exec, ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -show drun"