secrets: simplified public key loading

This commit is contained in:
Aly Raffauf 2024-06-10 23:14:18 -04:00
parent df8657bfa8
commit 7c16ad2f7c

View file

@ -1,16 +1,14 @@
let let
keys = [ hosts = [
(builtins.readFile ./publicKeys/aly_fallarbor.pub) "fallarbor"
(builtins.readFile ./publicKeys/aly_lavaridge.pub) "lavaridge"
(builtins.readFile ./publicKeys/aly_mauville.pub) "mauville"
(builtins.readFile ./publicKeys/aly_petalburg.pub) "petalburg"
(builtins.readFile ./publicKeys/aly_rustboro.pub) "rustboro"
(builtins.readFile ./publicKeys/root_fallarbor.pub)
(builtins.readFile ./publicKeys/root_lavaridge.pub)
(builtins.readFile ./publicKeys/root_mauville.pub)
(builtins.readFile ./publicKeys/root_petalburg.pub)
(builtins.readFile ./publicKeys/root_rustboro.pub)
]; ];
systemKeys = builtins.map (host: builtins.readFile ./publicKeys/root_${host}.pub) hosts;
userKeys = builtins.map (host: builtins.readFile ./publicKeys/aly_${host}.pub) hosts;
keys = systemKeys ++ userKeys;
in { in {
"lastFM/apiKey.age".publicKeys = keys; "lastFM/apiKey.age".publicKeys = keys;
"lastFM/secret.age".publicKeys = keys; "lastFM/secret.age".publicKeys = keys;