Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can't set user shell without giving nix-darwin complete control over my user #328

Open
lilyball opened this issue Apr 29, 2021 · 4 comments

Comments

@lilyball
Copy link
Contributor

I want to use nix-darwin to set my user's login shell, but it doesn't look like there's any way to do this. From reading through the user module source, it only seems to set user properties for knownUsers, and only when the user doesn't exist yet. There's an option to force-recreate users, but this is a tremendously bad idea for my own user account. I really would have expected some way to have nix-darwin update my user with the specifically-configured properties (well, basically just shell, the others seem risky to do on my user account). I can presumably write my own custom activation script for this but I shouldn't have to.

@d12frosted
Copy link

Faced similar issue. The only feasible solution here is to manually change shell for my user.

@yacinehmito
Copy link
Contributor

I am affected the same way. If one forgets to set knownUsers, they need to completely delete it before rebuilding.

@yacinehmito
Copy link
Contributor

it only seems to set user properties for knownUsers, and only when the user doesn't exist yet.

Shall the behavior be changed so that nix takes control of users that have knownUsers set, even if they have not been created by nix?

@bestlem
Copy link

bestlem commented Jan 25, 2023

Shall the behavior be changed so that nix takes control of users that have knownUsers set, even if they have not been created by nix?

I think so. I am trying to use nix to manage my computer, installing programs like a package manager etc, however I will also use non nix programs so I won't get totally repeatable builds. I am using it for convience.

I think this should be an option though as some people will want the full control. The default should be to allow the chnage as that is what beginners will try to do.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants