clanCore secrets: add secretStore option
This commit is contained in:
parent
a043368ed6
commit
3f6fa0eeca
|
@ -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: {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user