modules/impurity-logger: init
This commit is contained in:
parent
f0af04ea73
commit
3d751970fb
2 changed files with 17 additions and 0 deletions
|
@ -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 ];
|
||||||
|
|
15
modules/impurity-logger/default.nix
Normal file
15
modules/impurity-logger/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue