-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making the user available in profiles #230
Comments
I've read this over a couple times and I'm still not sure I understand what your asking. When you say add a group to a user, I think of something like this:
And when I read "making the user available in profiles", I would just think you could create a docker profile that creates the docker user - I usually just use the users folder for my personal users not system ones. But all those things are standard nixos things and also are possible in pretty much any version of devos. So I think I don't think I understand this issue and what your goal is. If you could clarify that would be helpful. |
Ah, I see what the confusion is. Does this look possible to you? |
Got it, I see the issue. I think anything done by profiles should be made available through standard module system semantics and profiles only edit Can you use
In terms of changes for devos, maybe we could pass more information about profiles somehow, I'm not sure how that would look since profiles are just standard module system modules. |
I wish I could give you some ideas, but I'm not that well versed in Nix, unfortunately. From the two options, I prefer the second one. Could you give an example of how to do that? I think that would be pretty useful as a library util function, at least. If that's even possible. |
For the second option I think it would look something like this: { config, lib, ... }:
{
users.groups.docker.members = builtins.attrNames (lib.filterAttrs (n: v: v.isNormalUser) config.users.users);
} and then make sure to enable This is definitely a good idea for a lib function lib.getMyUsers and I think it would be good if we started to add more useful functions like this in general. Because right now devos lib is mostly things needed to get devos to work. But it could use some functions that are more helpful. |
Yeah, that would be great. But in the meantime, I appreciate the code snippet 😁 I'll go ahead and close this issue now, but feel free to open it back up if you need it. Thanks once again! |
I'm using a somewhat outdated version of this template, so this may already be possible and I may not know about it.
I'm planning on updating my config but want to wait until it's a bit more stable :)
So, my question is: Is it possible (or is there a way) to provide the user(s) to the profiles?
The use case I'm trying to solve is adding the
docker
group to the user in adocker
user profile. That way I don't have the group in the user file and the docker config in a profile.I apologize in advance if this had already been discussed. I couldn't find any references to it 😄
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: