Skip to content
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

add a NixOS test for setting a user's passwordFile with agenix; and some features/fixes this required #40

Merged
merged 3 commits into from
May 10, 2021

Conversation

ryantm
Copy link
Owner

@ryantm ryantm commented May 9, 2021

Includes:

  • fix: allow deps of installRootOwnedSecrets activation script to be overridden
  • feature: use uid 0 and gid 0 as default owner and group (consider them root)
    This assumes that the root user is always uid 0 and gid 0, which I
    believe is a safe assumption. The reason to add this is because when a
    declarative VM (for example, a NixOS test) or image boots the first
    time, the installRootOwnedSecrets activation script runs BEFORE the
    "users" and "groups" activation scripts, so the user and group for
    root is not created. Using uid 0 and gid 0 gets around the root user
    not being set up yet.
  • dev: add integration test

ryantm added 3 commits May 9, 2021 14:17
…m root)

This assumes that the root user is always uid 0 and gid 0, which I
believe is a safe assumption. The reason to add this is because when a
declarative VM (for example, a NixOS test) or image boots the first
time, the installRootOwnedSecrets activation script runs BEFORE the
"users" and "groups" activation scripts, so the user and group for
root is not created. Using uid 0 and gid 0 gets around the root user
not being set up yet.
@ryantm
Copy link
Owner Author

ryantm commented May 9, 2021

cc @asymmetric @cole-h

@ryantm
Copy link
Owner Author

ryantm commented May 9, 2021

Run the test with nix-build test/integration.nix.

Copy link
Collaborator

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Test runs fine.

@ryantm ryantm merged commit b25c37a into master May 10, 2021
@ryantm ryantm deleted the test branch May 10, 2021 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants