modules/impurity-logger: init

This commit is contained in:
Max Headroom 2023-11-13 21:22:36 +01:00
parent f0af04ea73
commit 3d751970fb
2 changed files with 17 additions and 0 deletions

View file

@ -10,6 +10,7 @@ let
./hardened ./hardened
./hyprspace ./hyprspace
./idm ./idm
./impurity-logger
./ipfs ./ipfs
./jackett ./jackett
./laptop-config ./laptop-config
@ -34,6 +35,7 @@ in rec {
autopatch autopatch
hardened hardened
idm idm
impurity-logger
]; ];
networking = [ firewall ssh ]; networking = [ firewall ssh ];

View file

@ -0,0 +1,15 @@
{ lib, pkgs, ... }:
let
mkTracer = name: target: exe: lib.getExe (pkgs.writeShellScriptBin name ''
echo "PID $PPID executed ${target}" |& systemd-cat --identifier=impurity >/dev/null 2>/dev/null
exec -a "$0" '${exe}' "$@"
'');
in
{
environment = {
usrbinenv = mkTracer "env" "/usr/bin/env" "${pkgs.coreutils}/bin/env";
binsh = mkTracer "sh" "/bin/sh" "${pkgs.bashInteractive}/bin/sh";
};
}