refactor: centralize host and user metadata

This commit is contained in:
2026-04-21 12:12:43 +02:00
parent 5cfd4d01c8
commit 6332c96d3e
33 changed files with 805 additions and 479 deletions
+5 -5
View File
@@ -6,15 +6,15 @@ let
sopsAdminKeyPath = "/var/lib/sops/keys.txt";
in
{
flake.modules.nixos.sopsHost =
flake.modules.nixos."sops-host" =
{
hostType ? "desktop",
config,
lib,
...
}:
let
useHostSshKey = hostType == "server";
useAdminKeyFile = hostType != "server";
useHostSshKey = config.meta.host.kind == "server";
useAdminKeyFile = config.meta.host.kind != "server";
adminKeyDir = builtins.dirOf sopsAdminKeyPath;
in
{
@@ -37,7 +37,7 @@ in
];
};
flake.modules.homeManager.sopsAdmin =
flake.modules.homeManager."sops-admin" =
{
pkgs,
...