diff --git a/modules/services/logging/syslogd.nix b/modules/services/logging/syslogd.nix index 7c3e54cadb0..64b158742ec 100644 --- a/modules/services/logging/syslogd.nix +++ b/modules/services/logging/syslogd.nix @@ -19,6 +19,8 @@ let *.crit /var/log/warn *.*;mail.none;local1.none -/var/log/messages + + ${config.services.syslogd.extraConfig} ''; in @@ -37,6 +39,14 @@ in messages. ''; }; + + extraConfig = mkOption { + default = ""; + example = "news.* -/var/log/news"; + description = '' + Additional text appended to syslog.conf. + ''; + }; }; diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix index c404e044f63..5e62c698f27 100644 --- a/modules/testing/test-instrumentation.nix +++ b/modules/testing/test-instrumentation.nix @@ -74,7 +74,12 @@ in # `xwininfo' is used by the test driver to query open windows. environment.systemPackages = [ pkgs.xorg.xwininfo ]; - + + # Send all of /var/log/messages to the serial port (except for + # kernel messages through klogd, which already appear on the + # serial port). + services.syslogd.extraConfig = "*.*,kern.none /dev/ttyS0"; + }; }