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

Resolve project root to find secrets.nix #201

Open
mweinelt opened this issue Sep 18, 2023 · 0 comments
Open

Resolve project root to find secrets.nix #201

mweinelt opened this issue Sep 18, 2023 · 0 comments

Comments

@mweinelt
Copy link

mweinelt commented Sep 18, 2023

It would be very ergonomic if agenix wouldn't have to be executed from within the directory containing the secrets.nix, but instead resolved its path somewhere below the project root, possibly using git rev-parse --show-toplevel.

$ agenix -e secrets/alertmanager-secrets.age
error:
       … while calling the 'concatStringsSep' builtin

         at «string»:1:39:

            1| (let rules = import ./secrets.nix; in builtins.concatStringsSep "
             |                                       ^
            2| n" rules."secrets/alertmanager-secrets.age".publicKeys)

       … while calling the 'import' builtin

         at «string»:1:14:

            1| (let rules = import ./secrets.nix; in builtins.concatStringsSep "
             |              ^
            2| n" rules."secrets/alertmanager-secrets.age".publicKeys)

       error: getting status of '/home/hexa/git/mrmcd/nixos-config/secrets.nix': No such file or directory
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

1 participant