git.iko.soy/typeable/nixpkgs
on master help sign in
dante service: default for logoutput

Log to journald via syslog by default; also improve option type.

commitb827307c52215c1ef4696e6d7d3c307892ec5231 authorNikolay Amiantov <ab@fmap.me> dateMon 16 Apr 2018, 15:15 (9 years ago) parentbd140fb
1 file changed+5−5
nixos/modules/services/networking/dante.nix+5−5
nixos/modules/services/networking/dante.nix+5−5
@@ -6,6 +6,7 @@ let
66 confFile = pkgs.writeText "dante-sockd.conf" ''
77 user.privileged: root
88 user.unprivileged: dante
9+ logoutput: syslog
910
1011 ${cfg.config}
1112 '';
@@ -21,11 +22,10 @@ in
2122 enable = mkEnableOption "Dante SOCKS proxy";
2223
2324 config = mkOption {
24− default = null;
25− type = types.nullOr types.str;
25+ type = types.lines;
2626 description = ''
27− Contents of Dante's configuration file
28− NOTE: user.privileged/user.unprivileged are set by the service
27+ Contents of Dante's configuration file.
28+ NOTE: user.privileged, user.unprivileged and logoutput are set by the service.
2929 '';
3030 };
3131 };
@@ -33,7 +33,7 @@ in
3333
3434 config = mkIf cfg.enable {
3535 assertions = [
36− { assertion = cfg.config != null;
36+ { assertion = cfg.config != "";
3737 message = "please provide Dante configuration file contents";
3838 }
3939 ];