-
Notifications
You must be signed in to change notification settings - Fork 68
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
Better support users/groups existing before install #238
Better support users/groups existing before install #238
Conversation
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.
I think this looks fine.
@@ -37,7 +35,7 @@ impl CreateUsersAndGroups { | |||
settings.nix_build_group_id, | |||
) | |||
}) | |||
.collect(); | |||
.collect::<Result<_, _>>()?; |
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.
That's a weird type signature... I don't often see collect
ing into Result<_, _>
😆
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.
It's fun to can turn a Vec<Result<_,_>>
into a Result<Vec<_>,_>
This partially improves #218 but doesn't quite cover it. |
Description
This PR makes it so that if users/groups exist already on a machine when we attempt an install, and they're the UIDs/GIDs we expect, we mark them as already done. (This also means we don't remove them on uninstall)
Part of #35
Checklist
cargo fmt
nix build
nix flake check
Validating with
install.determinate.systems
If a maintainer has added the
upload to s3
label to this PR, it will become available for installation viainstall.determinate.systems
: