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

secrets rendered in a nix file #22

Open
bashfulrobot opened this issue Apr 24, 2024 · 0 comments
Open

secrets rendered in a nix file #22

bashfulrobot opened this issue Apr 24, 2024 · 0 comments

Comments

@bashfulrobot
Copy link

Hi there, I am just curious if:

  1. this is possible, or;
  2. Do you plan to add a similar feature

I am on a single-user system, and my use case is to keep secrets out of Git.

Can you render a secret directly into a Nix file? For example:

programs = {
      git = {
        enable = true;
        userEmail = "${secrets.git.email}";
        
        # SNIPPED

I currently use git-crypt to encrypt a JSON file containing my secrets. I do secrets = builtins.fromJSON (builtins.readFile "${self}/secrets/secrets.json"); and then pass the secrets reference into my nix files. But I would prefer to use something a little more purpose-built.

Thank you.

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