-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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-generate-config: observe device label if present #339995
base: master
Are you sure you want to change the base?
Conversation
Partially fixes NixOS#27789 by using matching devices found in `/dev/disk/by-label/*` before using any found in `by-uuid`. Wil T's install tutorial explains the motivation: https://www.youtube.com/watch?v=axOxLJ4BWmY&t=1295s
I'm not all that knowledgeable about this topic, but I guess I can review the process.
@ofborg build nixos-install-tools.tests |
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.
Yes this should be preferred. Further change would be also using by-partuuid
in favor of by-uuid
, but that's not tested
by-partlabel will also be nice to have (very handy for exotic configs) |
Automated installations may still be affected by this, so this is worth adding to the release notes. Could you do that? |
The choice between various device ID types may be complicated:
|
Document possible breakage to automated installations
@roberth done. |
@ofborg build nixos-install-tools.tests |
Partially fixes #27789 by using matching devices found in
/dev/disk/by-label/*
before using any found in/dev/disk/by-uuid/*
.Wil T's install tutorial explains the motivation: https://www.youtube.com/watch?v=axOxLJ4BWmY&t=1295s
Description of changes
This doesn't change any packages; only newly generated hardware configurations are affected.
This does NOT fix #27789 as originally reported (I was not able to repro that myself), but does address this comment.
At some point the automatic detection of device labels broke and device UUIDs began taking precedent over labels. This makes setting up a new computer a more manual and error-prone process than it needs to be.
With this change, I can instead use the devices generated as-is in
hardware-configuration.nix
on reinstall.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.