about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-30T23·23+0100
committertazjin <mail@tazj.in>2020-06-30T23·32+0000
commit1eb8067bb0a912f0160b6ca474ba027ea5dc922f (patch)
tree93eb1d9b151d25eda032c622165cde8825970ca5
parent46d4a73e344b9f742210f7c545f8d7cffc223348 (diff)
fix(nixos/smtprelay): Only enable if the user asks for it r/1140
Change-Id: Ifbdf9bf9e89a1da68e8c823f61a33275183afcb1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/822
Reviewed-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
Tested-by: BuildkiteCI
-rw-r--r--ops/nixos/smtprelay.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/ops/nixos/smtprelay.nix b/ops/nixos/smtprelay.nix
index ca960f5190a8..044902b15a9a 100644
--- a/ops/nixos/smtprelay.nix
+++ b/ops/nixos/smtprelay.nix
@@ -6,6 +6,7 @@ let
   inherit (lib)
     concatStringsSep
     mkEnableOption
+    mkIf
     mkOption
     types
 ;
@@ -36,7 +37,7 @@ in {
     };
   };
 
-  config = {
+  config = mkIf cfg.enable {
     systemd.services.smtprelay = {
       inherit description;
       script = "${config.depot.third_party.smtprelay}/bin/smtprelay ${prepareArgs cfg.args}";