refactor: modularize the agenix config

This commit is contained in:
EinEtwas 2024-10-24 00:26:49 +02:00
parent e2fd0c8b5f
commit 24f336d9b5
Signed by: etwas
SSH key fingerprint: SHA256:bHhIeAdn/2k9jmOs6+u6ox98VYmoHUN3HfnpV2w8Ws0
2 changed files with 32 additions and 21 deletions

31
home/agenix.nix Normal file
View file

@ -0,0 +1,31 @@
{ config, ... }:
{
# TODO: Get a token2 and set up https://github.com/oddlama/agenix-rekey
age.identityPaths = [ "/var/lib/persistent/host_id_ed25519" ];
age.secrets.access-tokens-github.file = ../secrets/gh.age;
age.secrets.obvps-id = {
file = ../secrets/1bvps.age;
path = "/home/rhea/.ssh/id_1bvps";
owner = "rhea";
symlink = false;
};
age.secrets.gcd_etwas = {
file = ../secrets/gcd_etwas.age;
path = "/home/rhea/.ssh/id_gcd_etwas";
owner = "rhea";
symlink = false;
};
age.secrets.etwas_sign_key = {
file = ../secrets/sign_etwas.age;
path = "/home/rhea/.ssh/etwas_sign_key";
owner = "rhea";
symlink = false;
};
nix.extraOptions = ''
!include ${config.age.secrets.access-tokens-github.path}
'';
}

View file

@ -4,29 +4,9 @@
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.catppuccin.nixosModules.catppuccin inputs.catppuccin.nixosModules.catppuccin
inputs.spicetify-nix.nixosModules.default inputs.spicetify-nix.nixosModules.default
./agenix.nix
]; ];
# TODO: Get a token2 and set up https://github.com/oddlama/agenix-rekey
age.identityPaths = [ "/var/lib/persistent/host_id_ed25519" ];
age.secrets.access-tokens-github.file = ../secrets/gh.age;
age.secrets.obvps-id = {
file = ../secrets/1bvps.age;
path = "/home/rhea/.ssh/id_1bvps";
owner = "rhea";
symlink = false;
};
age.secrets.gcd_etwas = {
file = ../secrets/1bvps.age;
path = "/home/rhea/.ssh/id_gcd_etwas";
owner = "rhea";
symlink = false;
};
nix.extraOptions = ''
!include ${config.age.secrets.access-tokens-github.path}
'';
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;