vms: use vm fact/secret-store

This commit is contained in:
lassulus
2024-02-14 07:15:59 +01:00
parent 98139ac48d
commit 6871b29d15
14 changed files with 161 additions and 56 deletions

View File

@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
{
options.clanCore.secretStore = lib.mkOption {
type = lib.types.enum [ "sops" "password-store" "custom" ];
type = lib.types.enum [ "sops" "password-store" "vm" "custom" ];
default = "sops";
description = ''
method to store secrets
@@ -150,5 +150,6 @@
imports = [
./sops.nix
./password-store.nix
./vm.nix
];
}

View File

@@ -0,0 +1,10 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.clanCore.secretStore == "vm") {
clanCore.secretsDirectory = "/etc/secrets";
clanCore.secretsUploadDirectory = "/etc/secrets";
system.clan.secretsModule = "clan_cli.secrets.modules.vm";
system.clan.factsModule = "clan_cli.facts.modules.vm";
};
}