split waybar into multiple files

This commit is contained in:
Lucy Hochkamp 2025-10-06 21:29:04 +02:00
parent 53c7532351
commit 7cff7f09c3
No known key found for this signature in database
29 changed files with 953 additions and 617 deletions

View file

@ -11,10 +11,15 @@ let
adminKeys = [
"0D98D5964AC8BB1CA034CE4EC456133700066642" # xyno main gpg key
];
keysPerHost = (mapAttrs (n: v: (toList v.sopsKey)) (
filterAttrs (n: v: v ? sopsKey) instanceConfigs
));
keysPerHost = (
mapAttrs (n: v: (toList v.sopsKey)) (filterAttrs (n: v: v ? sopsKey) instanceConfigs)
);
desktopHostNames = [ "theseus" ];
hostKeys = flatten (attrValues keysPerHost);
desktopKeys = flatten (
attrValues (filterAttrs (n: v: any (x: x == n) desktopHostNames) keysPerHost)
);
sopsCfg = {
keys = adminKeys ++ hostKeys;
@ -23,6 +28,10 @@ let
path_regex = "secrets/[^/]+\.(yaml|json|env|ini)$";
key_groups = [ { pgp = adminKeys ++ hostKeys; } ];
}
{
path_regex = "secrets/desktop/[^/]+\.(yaml|json|env|ini)$";
key_groups = [ { pgp = adminKeys ++ desktopKeys; } ];
}
]
++ (mapAttrsToList (n: v: {
# path_regex = "instances/${n}/secrets/[^/]+\.(yaml|json|env|ini)$";
@ -33,4 +42,5 @@ let
};
sopsCfgFile = writeText ".sops.yaml" (builtins.toJSON sopsCfg);
in sopsCfgFile
in
sopsCfgFile