refactor: centralize host and user metadata
This commit is contained in:
@@ -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,
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user