(NixOS) Home-Manager for POSIX Groups to De-Duplicate Options #8677
SpectralPixel
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
excuse me if this is already possible within home-manager, since I couldn't find any documentation regarding this.
I think it would be a great addition to home-manager if you could define shared config between several users by simply defining options for a user group via
home-manager.groups.<group-name>in NixOS.Say that Alice, Bob and Carol share a computer with one configuration, where each has their own user account. Alice and Bob both use the computer for work, so they both join the
work-usersgroup and definehome-manager.groups.work-users = { --snip-- programs.onlyoffice.enable = true; }.Meanwhile, Bob and Carol both use the computer for gaming, so they join the
gamersgroup and definehome-manager.groups.gamers = { --snip-- programs.lutris.enable = true; }.When it comes to conflicting options, I think the options defined by the local user should always take precedence over the options defined by the group. Or maybe, the safer solution would be to make the interpreter crash early when it's unable to merge configs.
What do y'all think? I feel like there's definitely potential to make configs more DRY to prevent any errors or configs going out of sync over time. Also, it'd be very convenient for sysadmins who manage several different users who share many options.
PS: I don't think it makes sense to simply "define the options in NixOS for all users", since that defeats the point of only making changes to certain users who opt-in.
Beta Was this translation helpful? Give feedback.
All reactions