1
0

send kernel logs to s6

This commit is contained in:
Daniel Barlow 2024-10-16 18:59:42 +01:00
parent 4a0120487c
commit e35a1514ab
2 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,7 @@ let
./modules/busybox.nix
./modules/hostname.nix
./modules/kernel
./modules/klogd.nix
device.module
liminix-config
./modules/s6

15
modules/klogd.nix Normal file
View File

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
let
inherit (pkgs.liminix.services) longrun;
in {
config.services.klogd = longrun {
name = "klogd";
run = ''
echo "1 2 1 8" > /proc/sys/kernel/printk
cat /proc/kmsg
'';
finish = ''
echo "8 4 1 8" > /proc/sys/kernel/printk
'';
};
}