feat(secrets): agenix init

This commit is contained in:
ooks-io 2024-06-16 18:55:05 +12:00
parent f9a2e83e74
commit 01f68f7712
4 changed files with 44 additions and 1 deletions

View file

@ -18,6 +18,7 @@ in
git
deadnix
statix
inputs.agenix.packages.${system}.default
];
defaultPackages = [];
etc = {

View file

@ -0,0 +1,24 @@
{ config, lib, self, ... }:
let
inherit (lib) mkIf;
host = config.ooknet.host;
admin = host.admin;
tailscale = host.networking.tailscale;
in
{
age.identityPaths = [
"/home/${admin.name}/.ssh/id_ed25519"
];
age.secrets = {
tailscale-auth = mkIf tailscale.enable {
file = "${self}/secrets/tailscale-auth.age";
owner = "${admin.name}";
group = "users";
mode = "400";
};
};
}