nix-config/packages/timer.nix
Oliver Davies e5ae3a4be7
All checks were successful
/ check (push) Successful in 1m40s
Add timer script
Based on
6b71b580de/bin/timer
and
6b71b580de/bin/_timer.
2025-07-11 01:31:02 +01:00

21 lines
370 B
Nix

{ pkgs }:
pkgs.writeShellApplication {
name = "timer";
runtimeInputs = with pkgs; [
_timer
coreutils
systemdMinimal
];
text = ''
mins=$1
message="''${2:-}"
nohup _timer "$mins" "$message" &> /dev/null &
echo "timer started for $mins min"
echo "timer started for $mins min, message: '$message'" | systemd-cat -t timer
'';
}