fix conditions for enabling services
Without this fix, kresd and others would get enabled even though the main mailserver option is disabled.
This commit is contained in:
parent
68232ddf87
commit
845e06e61a
7 changed files with 11 additions and 11 deletions
|
@ -19,7 +19,7 @@
|
|||
let
|
||||
cfg = config.mailserver.borgbackup;
|
||||
|
||||
methodFragment = lib.optional (cfg.compression.method != null) cfg.compression.method;
|
||||
methodFragment = lib.optional (cfg.compression.method != null) cfg.compression.method;
|
||||
autoFragment =
|
||||
if cfg.compression.auto && cfg.compression.method == null
|
||||
then throw "compression.method must be set when using auto."
|
||||
|
@ -56,7 +56,7 @@ let
|
|||
${cmdPostexec}
|
||||
'';
|
||||
in {
|
||||
config = lib.mkIf config.mailserver.borgbackup.enable {
|
||||
config = lib.mkIf (config.mailserver.enable && cfg.enable) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
borgbackup
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue