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,7 +8,8 @@
...
}:
let
hmConfig = config.home-manager.users.${user.name};
userConfig = config.users.users.${username};
hmConfig = config.home-manager.users.${username};
themeSwww = lib.meta.getExe (
pkgs.writeShellApplication {
name = "theme-swww";
@@ -21,10 +22,10 @@ let
);
in
{
home-manager.users.${user.name} = {
home-manager.users.${username} = {
home = {
packages = with pkgs; [ swww ];
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
persistence."/cache${userConfig.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
};
systemd.user.services.swww = {