1
0

modules/monitoring: specify custom privateKeyFile path for wg-monitoring

This commit is contained in:
2023-05-06 16:11:49 +02:00
parent f8328936b9
commit 2feb1b2b4c
3 changed files with 8 additions and 1 deletions

View File

@@ -21,6 +21,11 @@ in
type = types.str;
description = "Public Key of the monitoring wireguard interface of this host";
};
privateKeyFile = mkOption {
type = with types; nullOr str;
default = null;
description = "Path to private key file, pulls secret from secret store when null";
};
serviceLevel = mkOption {
type = types.str;
default = "infra";
@@ -49,7 +54,7 @@ in
publicKey = "eyhJKV41E1F0gZHBNqyzUnj72xg5f3bdDduVtpPN4AY=";
}
];
privateKeyFile = config.age.secrets.wg-monitoring.path;
privateKeyFile = if cfg.privateKeyFile == null then config.age.secrets.wg-monitoring.path else cfg.privateKeyFile;
};
};