diff options
author | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-01-25 11:08:05 -0800 |
---|---|---|
committer | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-01-25 11:08:05 -0800 |
commit | bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e (patch) | |
tree | 56abaf30f11ad2f24b9fb7729f74c5fff50fbd93 /nixos/modules/services/logging | |
parent | 1f9494b752082ec3ac048e56d1c6364a2e23a675 (diff) | |
parent | 104c3db6594043dbb81005303f055b02145305a5 (diff) | |
download | nixlib-bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e.tar nixlib-bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e.tar.gz nixlib-bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e.tar.bz2 nixlib-bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e.tar.lz nixlib-bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e.tar.xz nixlib-bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e.tar.zst nixlib-bae00e8aa8f3faff90e28e19cd5074b8c26d0d0e.zip |
setcap-wrapper: Merging with upstream master and resolving conflicts
Diffstat (limited to 'nixos/modules/services/logging')
-rw-r--r-- | nixos/modules/services/logging/logcheck.nix | 72 | ||||
-rw-r--r-- | nixos/modules/services/logging/syslogd.nix | 6 |
2 files changed, 43 insertions, 35 deletions
diff --git a/nixos/modules/services/logging/logcheck.nix b/nixos/modules/services/logging/logcheck.nix index 755599ff6215..86451ec318c9 100644 --- a/nixos/modules/services/logging/logcheck.nix +++ b/nixos/modules/services/logging/logcheck.nix @@ -55,49 +55,53 @@ let levelOption = mkOption { default = "server"; - type = types.str; + type = types.enum [ "workstation" "server" "paranoid" ]; description = '' - Set the logcheck level. Either "workstation", "server", or "paranoid". + Set the logcheck level. ''; }; ignoreOptions = { - level = levelOption; + options = { + level = levelOption; - regex = mkOption { - default = ""; - type = types.str; - description = '' - Regex specifying which log lines to ignore. - ''; + regex = mkOption { + default = ""; + type = types.str; + description = '' + Regex specifying which log lines to ignore. + ''; + }; }; }; ignoreCronOptions = { - user = mkOption { - default = "root"; - type = types.str; - description = '' - User that runs the cronjob. - ''; - }; + options = { + user = mkOption { + default = "root"; + type = types.str; + description = '' + User that runs the cronjob. + ''; + }; - cmdline = mkOption { - default = ""; - type = types.str; - description = '' - Command line for the cron job. Will be turned into a regex for the logcheck ignore rule. - ''; - }; + cmdline = mkOption { + default = ""; + type = types.str; + description = '' + Command line for the cron job. Will be turned into a regex for the logcheck ignore rule. + ''; + }; - timeArgs = mkOption { - default = null; - type = types.nullOr (types.str); - example = "02 06 * * *"; - description = '' - "min hr dom mon dow" crontab time args, to auto-create a cronjob too. - Leave at null to not do this and just add a logcheck ignore rule. - ''; + timeArgs = mkOption { + default = null; + type = types.nullOr (types.str); + example = "02 06 * * *"; + description = '' + "min hr dom mon dow" crontab time args, to auto-create a cronjob too. + Leave at null to not do this and just add a logcheck ignore rule. + ''; + }; }; }; @@ -180,8 +184,7 @@ in description = '' This option defines extra ignore rules. ''; - type = types.loaOf types.optionSet; - options = [ ignoreOptions ]; + type = with types; loaOf (submodule ignoreOptions); }; ignoreCron = mkOption { @@ -189,8 +192,7 @@ in description = '' This option defines extra ignore rules for cronjobs. ''; - type = types.loaOf types.optionSet; - options = [ ignoreOptions ignoreCronOptions ]; + type = with types; loaOf (submodule ignoreCronOptions); }; extraGroups = mkOption { diff --git a/nixos/modules/services/logging/syslogd.nix b/nixos/modules/services/logging/syslogd.nix index a0f8e89fa691..fe0b0490811d 100644 --- a/nixos/modules/services/logging/syslogd.nix +++ b/nixos/modules/services/logging/syslogd.nix @@ -100,6 +100,12 @@ in config = mkIf cfg.enable { + assertions = + [ { assertion = !config.services.rsyslogd.enable; + message = "rsyslogd conflicts with syslogd"; + } + ]; + environment.systemPackages = [ pkgs.sysklogd ]; services.syslogd.extraParams = optional cfg.enableNetworkInput "-r"; |