wip: migrate client modules

This commit is contained in:
Leon Schwarzäugl 2026-04-02 19:25:58 +02:00
parent f6d2ff1544
commit 7ce27d5d2f
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
245 changed files with 20254 additions and 188 deletions

24
aspects/battery-sops.nix Normal file
View file

@ -0,0 +1,24 @@
{ lib, den, ... }:
let
hostContext = { name, args, class }: { host }: {
nixos.sops.secrets.${name} = lib.mkIf (!host.isPublic) args // lib.optionalAttrs (class == "homeManager") { owner = host.mainUser; };
};
# deadnix: skip
hostUserContext = { name, args, class }: { host, user }: {
nixos.sops.secrets.${name} = lib.mkIf (!host.isPublic) args // lib.optionalAttrs (class == "homeManager") { owner = host.mainUser; };
};
homeContext = { name, args }: { home }: {
homeManager.sops.secrets.${name} = lib.mkIf (!home.isPublic) args;
};
in
{
den.provides.sops = { name, args, class ? "homeManager" }: den.lib.parametric.exactly {
includes = [
(hostContext { inherit name args class; })
(hostUserContext { inherit name args class; })
] ++ lib.optional (class == "homeManager") (homeContext { inherit name args; });
};
}