Avoid possible infinite recursion
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,11 @@
|
||||
...
|
||||
}:
|
||||
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} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
xdg = {
|
||||
@@ -22,13 +23,13 @@ in
|
||||
userDirs = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
XDG_VM_DIR = "${user.home}/VMs";
|
||||
XDG_GIT_DIR = "${user.home}/git";
|
||||
XDG_VM_DIR = "${userConfig.home}/VMs";
|
||||
XDG_GIT_DIR = "${userConfig.home}/git";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.persistence."/persist${user.home}".directories = with hmConfig.xdg.userDirs; [
|
||||
home.persistence."/persist${userConfig.home}".directories = with hmConfig.xdg.userDirs; [
|
||||
relativeDesktop
|
||||
relativeDocuments
|
||||
relativeDownload
|
||||
|
Reference in New Issue
Block a user