Make service name for secrets available
This commit is contained in:
parent
1edfcad643
commit
aa39f039aa
@ -183,6 +183,12 @@ in {
|
|||||||
description = "Environment variables to set for the ejabberd daemon.";
|
description = "Environment variables to set for the ejabberd daemon.";
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
required-services = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
description = "List of services that must start before ejabberd.";
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|||||||
@ -84,6 +84,12 @@ let
|
|||||||
description = "Arbitrary metadata associated with this secret.";
|
description = "Arbitrary metadata associated with this secret.";
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
service = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = "Host-side name of the service decrypting this secret.";
|
||||||
|
default = "fudo-secret-${name}.service";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -175,7 +181,7 @@ in {
|
|||||||
{ };
|
{ };
|
||||||
|
|
||||||
host-secret-services = mapAttrs' (secret: secretOpts:
|
host-secret-services = mapAttrs' (secret: secretOpts:
|
||||||
(nameValuePair "fudo-secret-${hostname}-${secret}"
|
(nameValuePair secretOpts.service
|
||||||
(secret-service hostname secret secretOpts))) host-secrets;
|
(secret-service hostname secret secretOpts))) host-secrets;
|
||||||
|
|
||||||
trace-all = obj: builtins.trace obj obj;
|
trace-all = obj: builtins.trace obj obj;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user