I'd like to configure persistent directories for all normal users.
I figured a filterAttrs and mapAttrs would do the trick, however it seems environment.persistence.*.users modifies users.users in some way resulting in infinite recursion.
environment.persistance."/persist".users =
mapAttrs
(name: {
directories = {
# Defaults for all normal users
};
})
(filterAttrs (name: user: user.isNormalUser) config.users.users);
I guess this the same underlying issue that means environment.persistence.*.users.home can't default to users.users.*.home? Although I'm unsure why that doesn't also apply to users.users.*.group...
It'd be great if either the recursion issue could be somehow fixed, or at least better documented.
Alternatively providing an "allNormalUsers" option (terrible name, I know) that is equivalent to doing this, but somehow bypassing recursion issues, would also resolve this.
I'd like to configure persistent directories for all normal users.
I figured a
filterAttrs
andmapAttrs
would do the trick, however it seemsenvironment.persistence.*.users
modifiesusers.users
in some way resulting in infinite recursion.I guess this the same underlying issue that means
environment.persistence.*.users.home
can't default tousers.users.*.home
? Although I'm unsure why that doesn't also apply tousers.users.*.group
...It'd be great if either the recursion issue could be somehow fixed, or at least better documented. Alternatively providing an "allNormalUsers" option (terrible name, I know) that is equivalent to doing this, but somehow bypassing recursion issues, would also resolve this.