1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-07 02:59:19 +03:00

nixos/klogd: remove

This module only has an effect for ancient kernel versions we don't
support.
This commit is contained in:
Alyssa Ross 2022-03-30 18:53:36 +00:00
parent 1aeeed378a
commit c099ec6aff
3 changed files with 15 additions and 35 deletions

View file

@ -1,38 +1,9 @@
{ config, lib, pkgs, ... }:
with lib;
{ lib, ... }:
{
###### interface
options = {
services.klogd.enable = mkOption {
type = types.bool;
default = versionOlder (getVersion config.boot.kernelPackages.kernel) "3.5";
defaultText = literalExpression ''versionOlder (getVersion config.boot.kernelPackages.kernel) "3.5"'';
description = ''
Whether to enable klogd, the kernel log message processing
daemon. Since systemd handles logging of kernel messages on
Linux 3.5 and later, this is only useful if you're running an
older kernel.
'';
};
};
###### implementation
config = mkIf config.services.klogd.enable {
systemd.services.klogd = {
description = "Kernel Log Daemon";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.sysklogd ];
unitConfig.ConditionVirtualization = "!systemd-nspawn";
script =
"klogd -c 1 -2 -n " +
"-k $(dirname $(readlink -f /run/booted-system/kernel))/System.map";
};
};
imports = [
(lib.mkRemovedOptionModule [ "security" "klogd" "enable" ] ''
Logging of kernel messages is now handled by systemd.
'')
];
}