Skip to content

Specify access token via file #6536

@Sohalt

Description

@Sohalt

Is your feature request related to a problem? Please describe.
I need to specify a github acess-token, if I want to include private repositories as flake inputs. I manage my /etc/nix/nix.conf declaratively on NixOS.

Describe the solution you'd like
I would like to keep the access token in a separate file using something like agenix or sops, to not have it end up in the nix store and in version control.
An option like acess-tokens-file = /run/secrets/access-tokens would be nice.
Ideally I'd be able to specify different access tokens in different files, e.g.
acess-tokens-files = github.com=/run/secrets/github-acess-token gitlab.com=/run/secrets/gitlab-acess-token

Describe alternatives you've considered

  • Add access-token to ǹix.extraOptions`
    • the token ends up in the nix store (and version control)
  • Add access-token to ~/.config/nix/nix.conf
  • This works, if I don't manage user config using home-manager, but it has the downside, that I have a separate secret to keep track of. It would be more convenient to be able to keep the secrets with all other secrets in agenix and use an access-tokens-files option in /etc/nix/nix.conf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions