Files
nix/hosts/common/configs/system/nix/default.nix
2025-02-28 11:00:21 +00:00

40 lines
886 B
Nix

{ config, inputs, ... }:
{
sops = {
secrets = {
"git/credentials/github.com/public/username".sopsFile =
../../../../../secrets/personal/secrets.yaml;
"git/credentials/github.com/public/password".sopsFile =
../../../../../secrets/personal/secrets.yaml;
};
templates."nix-access-tokens" = {
content = ''
access-tokens = github.com=${config.sops.placeholder."git/credentials/github.com/public/password"}
'';
group = "users";
};
};
nix = {
settings = {
use-xdg-base-directories = true;
experimental-features = [
"nix-command"
"flakes"
];
};
channel.enable = false;
gc.automatic = true;
optimise.automatic = true;
registry.self.flake = inputs.self;
extraOptions = ''
!include ${config.sops.templates."nix-access-tokens".path}
'';
};
}