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
./hyprspace
./idm
./impurity-logger
./ipfs
./jackett
./laptop-config
@ -34,6 +35,7 @@ in rec {
autopatch
hardened
idm
impurity-logger
];
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";
};
}