modules/monitoring: specify custom privateKeyFile path for wg-monitoring
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user