dotfiles/nix/lib/shared/scripts/timer.nix
Oliver Davies 69a397e624 Move Nix files into a nix directory
Move everything from `config` to the root level.
2024-11-21 08:56:12 +00:00

21 lines
366 B
Nix

{
name = "timer";
runtimeInputs = [ ];
text = ''
if [[ "$1" == "" ]]; then
echo "Usage: ''${0##*/} <mins> [message]"
exit 1
fi
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
'';
}