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