clanCore secrets: add secretStore option

This commit is contained in:
lassulus 2023-09-06 16:08:36 +02:00 committed by Mic92
parent a043368ed6
commit 3f6fa0eeca
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,12 @@
{ config, lib, ... }:
{
options.clanCore.secretStore = lib.mkOption {
type = lib.types.enum [ "sops" "password-store" "custom" ];
default = "sops";
description = ''
method to store secrets
'';
};
options.clanCore.secrets = lib.mkOption {
type = lib.types.attrsOf
(lib.types.submodule (secret: {

View File

@ -21,7 +21,7 @@ let
secrets = filterDir containsMachineOrGroups secretsDir;
in
{
config = {
config = lib.mkIf (config.clanCore.secretStore == "sops") {
system.clan.generateSecrets = pkgs.writeScript "generate-secrets" ''
#!/bin/sh
set -efu