mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
dante service: default for logoutput
Log to journald via syslog by default; also improve option type.
This commit is contained in:
parent
bd140fb41d
commit
b827307c52
@ -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";
|
||||
}
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user