liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e35a1514aba474d40d05b1e0b523aa3ec1d01e18
parent 4a0120487c15de47ee15bd9facb72ee76791eef3
Author: Daniel Barlow <dan@telent.net>
Date:   Wed, 16 Oct 2024 18:59:42 +0100

send kernel logs to s6

Diffstat:
Mdefault.nix | 1+
Amodules/klogd.nix | 15+++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/default.nix b/default.nix @@ -33,6 +33,7 @@ let ./modules/busybox.nix ./modules/hostname.nix ./modules/kernel + ./modules/klogd.nix device.module liminix-config ./modules/s6 diff --git a/modules/klogd.nix b/modules/klogd.nix @@ -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 + ''; + }; +}