dante service: default for logoutput

Log to journald via syslog by default; also improve option type.
This commit is contained in:
Nikolay Amiantov 2018-04-16 15:15:09 +03:00
parent bd140fb41d
commit b827307c52

View File

@ -6,6 +6,7 @@ let
confFile = pkgs.writeText "dante-sockd.conf" '' confFile = pkgs.writeText "dante-sockd.conf" ''
user.privileged: root user.privileged: root
user.unprivileged: dante user.unprivileged: dante
logoutput: syslog
${cfg.config} ${cfg.config}
''; '';
@ -21,11 +22,10 @@ in
enable = mkEnableOption "Dante SOCKS proxy"; enable = mkEnableOption "Dante SOCKS proxy";
config = mkOption { config = mkOption {
default = null; type = types.lines;
type = types.nullOr types.str;
description = '' description = ''
Contents of Dante's configuration file Contents of Dante's configuration file.
NOTE: user.privileged/user.unprivileged are set by the service NOTE: user.privileged, user.unprivileged and logoutput are set by the service.
''; '';
}; };
}; };
@ -33,7 +33,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [
{ assertion = cfg.config != null; { assertion = cfg.config != "";
message = "please provide Dante configuration file contents"; message = "please provide Dante configuration file contents";
} }
]; ];