summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorkoral <koral@mailoo.org>2015-02-12 13:21:36 +0100
committerkoral <koral@mailoo.org>2015-02-12 13:21:36 +0100
commitcb153cfca314a8c1f9fd263a82e8a8a7e32aafbb (patch)
tree894b389f31d1b6ab4d6020e8891ad463b441e443 /nixos/modules
parent1439e72147bf73adb862fd2d153602a5e52103d7 (diff)
downloadnixlib-cb153cfca314a8c1f9fd263a82e8a8a7e32aafbb.tar
nixlib-cb153cfca314a8c1f9fd263a82e8a8a7e32aafbb.tar.gz
nixlib-cb153cfca314a8c1f9fd263a82e8a8a7e32aafbb.tar.bz2
nixlib-cb153cfca314a8c1f9fd263a82e8a8a7e32aafbb.tar.lz
nixlib-cb153cfca314a8c1f9fd263a82e8a8a7e32aafbb.tar.xz
nixlib-cb153cfca314a8c1f9fd263a82e8a8a7e32aafbb.tar.zst
nixlib-cb153cfca314a8c1f9fd263a82e8a8a7e32aafbb.zip
sslh: added libwrap support + improved nixos module.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/sslh.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/sslh.nix b/nixos/modules/services/networking/sslh.nix
index 2bfdfc89c880..e251571dca31 100644
--- a/nixos/modules/services/networking/sslh.nix
+++ b/nixos/modules/services/networking/sslh.nix
@@ -6,13 +6,13 @@ let
   cfg = config.services.sslh;
   configFile = pkgs.writeText "sslh.conf" ''
     verbose: ${if cfg.verbose then "true" else "false"};
-    foreground: false;
+    foreground: true;
     inetd: false;
     numeric: false;
     transparent: false;
     timeout: "${toString cfg.timeout}";
     user: "nobody";
-    pidfile: "/run/sslh.pid";
+    pidfile: "${cfg.pidfile}";
 
     listen:
     (
@@ -50,6 +50,12 @@ in
         description = "Timeout in seconds.";
       };
 
+      pidfile = mkOption {
+        type = types.path;
+        default = "/run/sslh.pid";
+        description = "PID file path for sslh daemon.";
+      };
+
       host = mkOption {
         type = types.str;
         default = config.networking.hostName;
@@ -77,7 +83,7 @@ in
       wantedBy = [ "multi-user.target" ];
       serviceConfig.ExecStart = "${pkgs.sslh}/bin/sslh -F ${configFile}";
       serviceConfig.KillMode = "process";
-      serviceConfig.PIDFile = "/run/sslh.pid";
+      serviceConfig.PIDFile = "${cfg.pidfile}";
     };
   };
 }