nixos/postsrsd: add package option, migrate enable option
This commit is contained in:
parent
9a9073fc89
commit
c915f104b0
@ -18,6 +18,8 @@ let
|
|||||||
isPath
|
isPath
|
||||||
isString
|
isString
|
||||||
isList
|
isList
|
||||||
|
mkEnableOption
|
||||||
|
mkPackageOption
|
||||||
mkRemovedOptionModule
|
mkRemovedOptionModule
|
||||||
mkRenamedOptionModule
|
mkRenamedOptionModule
|
||||||
;
|
;
|
||||||
@ -81,11 +83,9 @@ in
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.postsrsd = {
|
services.postsrsd = {
|
||||||
enable = lib.mkOption {
|
enable = mkEnableOption "the postsrsd SRS server for Postfix.";
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
package = mkPackageOption pkgs "postsrsd" { };
|
||||||
description = "Whether to enable the postsrsd SRS server for Postfix.";
|
|
||||||
};
|
|
||||||
|
|
||||||
secretsFile = lib.mkOption {
|
secretsFile = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
@ -207,7 +207,7 @@ in
|
|||||||
description = ''
|
description = ''
|
||||||
Configuration options for the postsrsd.conf file.
|
Configuration options for the postsrsd.conf file.
|
||||||
|
|
||||||
See the [example configuration](https://github.com/roehling/postsrsd/blob/main/doc/postsrsd.conf) for possible values.
|
See the [example configuration](https://github.com/roehling/postsrsd/blob/${cfg.package.version}/doc/postsrsd.conf) for possible values.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ in
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = utils.escapeSystemdExecArgs [
|
ExecStart = utils.escapeSystemdExecArgs [
|
||||||
(lib.getExe pkgs.postsrsd)
|
(lib.getExe cfg.package)
|
||||||
"-C"
|
"-C"
|
||||||
"/etc/postsrsd.conf"
|
"/etc/postsrsd.conf"
|
||||||
];
|
];
|
||||||
@ -343,4 +343,7 @@ in
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# package version referenced in option documentation
|
||||||
|
meta.buildDocsInSandbox = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user