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

Nixbld UID used for cacheDir #38

Open
axelkar opened this issue Aug 1, 2024 · 1 comment
Open

Nixbld UID used for cacheDir #38

axelkar opened this issue Aug 1, 2024 · 1 comment

Comments

@axelkar
Copy link

axelkar commented Aug 1, 2024

My user's UID is 1001 and I'm getting an error during agenix-rekey's Realizing 4 store paths.
I modified output-derivation.nix to print out the id command, $HOME, $UID, the target hostname and the cachedir.
The path after rekeyed secret: suggested to me that $UID was not working and I was right!

% agenix rekey
Collecting information about hosts. This may take a while...
    Skipping [already rekeyed] NixAx:basic-auth-pw
   Realizing 4 store paths
error: builder for '/nix/store/fkr6gdjfzj7sjxnd3sngk72a7zhd9p04-agenix-rekey-host-secrets.drv' failed with exit code 1;
       last 10 log lines:
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/pg90p34kys2famxnq7925sbgj4jrnsi8-binutils-wrapper-2.42
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: installPhase
       > uid=1000(nixbld) gid=100(nixbld) groups=100(nixbld)
       > Home: /homeless-shelter
       > Hostname: NixAx
       > Cache dir: /tmp/agenix-rekey.1000
       > Copying /nix/store/52k45001rb6zp5wb7pm73hiixx3zhp3q-basic-auth-pw.age...
       > At least one rekeyed secret is missing, please run `agenix rekey` again.
       >   rekeyed secret: /tmp/agenix-rekey.1000/secrets/ea01eb6bba6163729aa78d851b512f85676c97f2781c7395c2221f095b05db29-basic-auth-pw.age
       For full logs, run 'nix log /nix/store/fkr6gdjfzj7sjxnd3sngk72a7zhd9p04-agenix-rekey-host-secrets.drv'.
@oddlama
Copy link
Owner

oddlama commented Aug 1, 2024

Hmm interesting, it kind of makes sense that the variable is taken from the daemon. I guess you will have to override the cacheDir setting to a static path to work around this. Alternatively you can switch to the local storage mode which I introduced to remove impurities like this one, since they tend to cause issues from time to time.

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

No branches or pull requests

2 participants