summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2018-04-16 15:15:09 +0300
committerNikolay Amiantov <ab@fmap.me>2018-04-26 13:57:11 +0300
commitb827307c52215c1ef4696e6d7d3c307892ec5231 (patch)
treef0ff46986b9a255c680b3b82d023e708fffa81ae /nixos
parentbd140fb41d5123a06568a98589271a23b6f0c398 (diff)
downloadnixpkgs-b827307c52215c1ef4696e6d7d3c307892ec5231.tar
nixpkgs-b827307c52215c1ef4696e6d7d3c307892ec5231.tar.gz
nixpkgs-b827307c52215c1ef4696e6d7d3c307892ec5231.tar.bz2
nixpkgs-b827307c52215c1ef4696e6d7d3c307892ec5231.tar.lz
nixpkgs-b827307c52215c1ef4696e6d7d3c307892ec5231.tar.xz
nixpkgs-b827307c52215c1ef4696e6d7d3c307892ec5231.tar.zst
nixpkgs-b827307c52215c1ef4696e6d7d3c307892ec5231.zip
dante service: default for logoutput
Log to journald via syslog by default; also improve option type.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/dante.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/services/networking/dante.nix b/nixos/modules/services/networking/dante.nix
index 67da28308e9..20d4faa1cdb 100644
--- a/nixos/modules/services/networking/dante.nix
+++ b/nixos/modules/services/networking/dante.nix
@@ -6,6 +6,7 @@ let
   confFile = pkgs.writeText "dante-sockd.conf" ''
     user.privileged: root
     user.unprivileged: dante
+    logoutput: syslog
 
     ${cfg.config}
   '';
@@ -21,11 +22,10 @@ in
       enable = mkEnableOption "Dante SOCKS proxy";
 
       config = mkOption {
-        default     = null;
-        type        = types.nullOr types.str;
+        type        = types.lines;
         description = ''
-          Contents of Dante's configuration file
-          NOTE: user.privileged/user.unprivileged are set by the service
+          Contents of Dante's configuration file.
+          NOTE: user.privileged, user.unprivileged and logoutput are set by the service.
         '';
       };
     };
@@ -33,7 +33,7 @@ in
 
   config = mkIf cfg.enable {
     assertions = [
-      { assertion   = cfg.config != null;
+      { assertion   = cfg.config != "";
         message     = "please provide Dante configuration file contents";
       }
     ];