feat: overhaul key management for agenix

This commit is contained in:
Youwen Wu 2024-12-27 20:12:15 -08:00
parent 39cbcd9c76
commit 4f510f7418
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
12 changed files with 48 additions and 96 deletions

View file

@ -0,0 +1,13 @@
rec {
users = builtins.attrValues {
youwen = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIwqDFdb/cs5K9gsgP0ogyuq5pv9hSxsyPnDcWc5wRKs";
runner = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEEBFBqlbHn3gMuV0i8U48xctZUWXkmHsCK1O6LRpXpj";
};
systems = builtins.attrValues {
demeter = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP4BRdoxPnmlhMD1kI7qXwVE//6h1XWUnkwpzDuJaAyC";
gallium = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJzDKscmZIz7GF0nfKpnKHq63/fwzx2PXir0mUtRDOgu";
};
all = users ++ systems;
}

View file

@ -1,27 +1,12 @@
age-encryption.org/v1 age-encryption.org/v1
-> ssh-rsa 4p6DaQ -> ssh-ed25519 ouRmYQ LcJhXf7RDzV69B18oyBQalIa7PuxKvgWf8WsQqS2QXQ
bQrpj5stBmy83Fk3M0sIno+WvcuNcc45JBUjlodontzHOig5ZduC26G8HXuegMVV FEAVwjc/S8FzBtBlVTNmnYiEBeqLJ1BgFlGGCCSKAFA
RWgv2Go/S2Rpbyq+u+l8acDmWfNRQyhpi20d+Erei4pYIBP0NvRntdCUDqcJNlI5 -> ssh-ed25519 lpWvhA gPmCbveLyfreFJBiSiwaA0PUwaPoWR3oxj6bcDCR32c
pFr6QbnUC6GI+zqobaRVJ3bg9DsNDb/HZHIkmZjLvO6uD2muAdLY9UdOQh0O/bKm z9PqoqZB4oExgdGHFczW/GfFXCwUAdX2y/6+OrAsvW4
1ZBAiBdtT3gZ2TWGk25XpCe+2If+aTsEHDBGOtjsofcaQgNG/+GEvpwSFopX80Nm -> ssh-ed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0YGvZe4OVP4BK4UNu5DKKLTpPNwDnyf1NSNTT2q2TsWXKWBDl1eurX9MBR24ZQEoP0gvcnTKr+2rheOTWJ5asDswEWphp5zQxBjztPGe55H0zjnqk= youwen@demeter"; keys = import ../authorized_keys.nix;
users = [ youwen ];
demeter = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDdcVbgUyQb+W3UjmYb3K9l9jkq/NkTSWAGFUJczJ07kEAg9nUUEfU6RGMCzCEbwWsVpNZysRfef6nxerQBcKiRz/bLUocFl/80ZoylQuxkWU8cvGdImFCtP76YKoVNwuHS0R31Qi90zQLnxs1oLmULSACH6Mw7+suYkVtH1prQdUHdx2bcOPqFk8Qpm8WuRNHxEbrFNuHNarHF3XHo/iIgJh8OeMbwE+MtoZCSfPMEnWGg4nKal3fQ3GO21wUyIZIZrSCMiYKzfvWrlLhd8rkKbGp+VRNe3m5q7k5p+pGSJMYHTRaGwOGY92L+GJOjjr/HrloINiEMC82zmUWctXQhK+4ni3ssPmOesEblfr9tXfwU0Xh0zNhqeljw/ptaZrM3k/yMW4h1DgI9BeBwcNcYqaHLwX6IqG5b8XxI+/JQniQmZIZM+kBx6GyZFrPxM84XWxhwjRKnn4oBU8kVn3RBlNwz3AFIjGpOh86Rd343X8Q6JbrMT/z17bL6StKXZfUFqgOWEs/JJEHT/DWKL2zF2ppqa5ZuJhzevrtKfAxomURXnQ77MPCUtbo2PFHmcl3fUD+yS2GD/8a492rUlCG2d5FS7KfW3L9rQwTnNBqQMGUu1Uc6qz5LWLEF7yoBtdKKZ3Y4lyPP3/lAQPs5j0Jx+coBdySca3xrmmvMj4/aIQ== root@nixos";
systems = [ demeter ];
in in
{ {
"nix_config_github_pat.age".publicKeys = users ++ systems; "nix_config_github_pat.age".publicKeys = keys.all;
"github_ssh_priv_key.age".publicKeys = users ++ systems; "github_ssh_priv_key.age".publicKeys = keys.all;
} }

View file

@ -1,16 +1,13 @@
let let
youwen = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCrIRHcvh0fxYNc0sukl8nSGRU8z1RjRmuc20iuk9TUqAxeew+0pSvY9lU4vshhrcGUe2OKIxgKJ76xdfGRw5ofmmd5Fr4If6tzWAWdE6Jr3J/w58YL6/ISOyRwjTserjWFIaO41y9OuLzf3UtzBF/1zexnGwq2lMJ7MAi0JNJ5O+umgrcnF1BDWyw7ymVkiQTruJ3LV2XgJDpOKQlFnVGKgYyMgVGeGYjiZO9Sj8edq1ZFeEH1jN5TnAdnqsiwhFgZpCrBxFFZKohuQLyH+QaOmBsdgSZwsg4Prndtxp5GTrknupPCgEWJ1rgvykEchYajeWQLxyeW/O/4iSST7VLKS7dgzUHZ5Dxf/QP1iCSeJqCIIJssuIslMK1vYmJZYk098ZDlLrFCLepQqy0YGvZe4OVP4BK4UNu5DKKLTpPNwDnyf1NSNTT2q2TsWXKWBDl1eurX9MBR24ZQEoP0gvcnTKr+2rheOTWJ5asDswEWphp5zQxBjztPGe55H0zjnqk= youwen@demeter"; keys = import ../../../secrets/authorized_keys.nix;
users = [ youwen ]; inherit (keys) users;
demeter = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDdcVbgUyQb+W3UjmYb3K9l9jkq/NkTSWAGFUJczJ07kEAg9nUUEfU6RGMCzCEbwWsVpNZysRfef6nxerQBcKiRz/bLUocFl/80ZoylQuxkWU8cvGdImFCtP76YKoVNwuHS0R31Qi90zQLnxs1oLmULSACH6Mw7+suYkVtH1prQdUHdx2bcOPqFk8Qpm8WuRNHxEbrFNuHNarHF3XHo/iIgJh8OeMbwE+MtoZCSfPMEnWGg4nKal3fQ3GO21wUyIZIZrSCMiYKzfvWrlLhd8rkKbGp+VRNe3m5q7k5p+pGSJMYHTRaGwOGY92L+GJOjjr/HrloINiEMC82zmUWctXQhK+4ni3ssPmOesEblfr9tXfwU0Xh0zNhqeljw/ptaZrM3k/yMW4h1DgI9BeBwcNcYqaHLwX6IqG5b8XxI+/JQniQmZIZM+kBx6GyZFrPxM84XWxhwjRKnn4oBU8kVn3RBlNwz3AFIjGpOh86Rd343X8Q6JbrMT/z17bL6StKXZfUFqgOWEs/JJEHT/DWKL2zF2ppqa5ZuJhzevrtKfAxomURXnQ77MPCUtbo2PFHmcl3fUD+yS2GD/8a492rUlCG2d5FS7KfW3L9rQwTnNBqQMGUu1Uc6qz5LWLEF7yoBtdKKZ3Y4lyPP3/lAQPs5j0Jx+coBdySca3xrmmvMj4/aIQ== root@nixos";
systems = [ demeter ];
in in
{ {
"youwenw_app_password.age".publicKeys = users ++ systems; "youwenw_app_password.age".publicKeys = users;
"youwen_ucsb_client_id.age".publicKeys = users ++ systems; "youwen_ucsb_client_id.age".publicKeys = users;
"youwen_ucsb_client_secret.age".publicKeys = users ++ systems; "youwen_ucsb_client_secret.age".publicKeys = users;
"tincan_app_password.age".publicKeys = users ++ systems; "tincan_app_password.age".publicKeys = users;
"github_cli_secret_config.age".publicKeys = users ++ systems; "github_cli_secret_config.age".publicKeys = users;
"github_ssh_priv_key.age".publicKeys = users ++ systems; "github_ssh_priv_key.age".publicKeys = users;
"youwen_dev_ssh_priv_key.age".publicKeys = users ++ systems; "youwen_dev_ssh_priv_key.age".publicKeys = users;
} }

View file

@ -1,26 +1,7 @@
age-encryption.org/v1 age-encryption.org/v1
-> ssh-rsa 4p6DaQ -> ssh-ed25519 ouRmYQ 1+lNK5IbFFikjqTNo3iMTnAigc4IuK9o5QLwTuC5RwQ
p0c0dK2Vlgj+nPitibtXJuzRr3g5crae4CS/6OH18WQkqb8tzaWRw1ZXxS/7nxGD h42XZCru60LAGVtDZ7W+flmLkz6PK43jWBi9/Lq92kQ
MCk8PcVEhgdysS1cwrgrycpUp02LMxUp1zTc8ML0Cemv93hnaVINgNGb9DWiGBXH -> ssh-ed25519 lpWvhA 4lgTQgn/iIdicT2wobAhiKR7axBe0MHZKqqeAsN0Aww
v8//XUeNpBs4oGkC9RWb9HDgBlgzpTH0XYUwqDBRT9ltn5nki5YvxM4powiOf8IG +9hwc6P68HkzV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