-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
nixos-install: ask which admin account to set password for #124602
Conversation
fb0f29d
to
1aa3888
Compare
Result of 2 packages built successfully:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
e6a544e
to
2a7c710
Compare
|
@GrahamcOfBorg test installer.simple installer.lvm installer.simpleSpecialised (kind of random selection; most variations are about file systems, block devices, boot loaders, which don't matter here) |
What if I have a lot of declarative users? Seems potentially undesirable to prompt for passwords for all of them. |
I can add |
Isn't the purpose of |
Alternative would be prompting for each user: Found the following users without passwords: root, adam, eve Do you want to set password for root? [Yes, no] n Do you want to set password for root? [Yes, no] setting adam password... |
In any case we don't need to ask passwords for all declarative users. We only need to ensure that at least one wheel user has a password. |
28481ca
to
1240095
Compare
I've reverted this change.
It's now prompting for each user if password is needed.
Should I then filter users by membership in |
It would still be nice to have explicit |
Tbh, I don't see the point in this at all and I just see myself annoyed by having to specify |
There is a linked issue with main pain points: #97422 |
What if we figured out which users already have passwords by checking
I actually dislike the current way where it asks for the root password by default even if you have already set one. |
c37bb30
to
7bcf7ef
Compare
|
7bcf7ef
to
9a7d41b
Compare
8bf3288
to
ca99e84
Compare
@ofborg test installer.simple installer.lvm installer.simpleSpecialised |
ca99e84
to
df03ae4
Compare
installer.simpleSpecialised test is already broken on master |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
df03ae4
to
f78b8aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the following locally, to reproduce:
git clone https://github.com/NixOS/nixpkgs && cd nixpkgs
git fetch origin pull/124602/head:docs-user-onboarding
git checkout docs-user-onboarding
nix-build nixos/tests/installer.nix -A simple
Result:
...
(finished: waiting for the VM to power off, in 1.21 seconds)
(finished: run the VM test script, in 1888.63 seconds)
test script finished in 1888.63s
cleanup
(finished: cleanup, in 0.00 seconds)
/nix/store/nd6f5f05vs5gz9jbxbcgzkvagay50kca-vm-test-run-installer-simple
Feel free to pick this up. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/low-effort-and-high-impact-tasks/21095/45 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Motivation for this change
Fixes: #97422
Fixes: #104343
Tested with
jane
user uncommented in generatedconfiguration.nix
:nixos-install
with newnixpkgs
- promts for username,jane
orroot
.If
users.mutableUsers
is set tofalse
or one of users have delared password in config, it doesn't asks any passwords.nixos-install
with oldnixpkgs
- promts for username, onlyroot
.nixos-install
with newnixpkgs
- asks forroot
password, just like before.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)