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" ''
|
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";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user