Add timer script
All checks were successful
/ check (push) Successful in 1m40s

Based on
6b71b580de/bin/timer
and
6b71b580de/bin/_timer.
This commit is contained in:
Oliver Davies 2025-07-11 01:31:02 +01:00
parent c676972d0b
commit e5ae3a4be7
4 changed files with 43 additions and 0 deletions

21
packages/timer.nix Normal file
View file

@ -0,0 +1,21 @@
{ 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
'';
}