mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: fix secrets permissions, move ./packages to flake outputs
This commit is contained in:
17
packages/timer.nix
Normal file
17
packages/timer.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
writers,
|
||||
bc,
|
||||
coreutils,
|
||||
espeak,
|
||||
}:
|
||||
writers.writeDashBin "timer" ''
|
||||
[ $# -eq 2 ] || {
|
||||
echo "Usage: $0 TIME MESSAGE" 1>&2
|
||||
exit 1
|
||||
}
|
||||
time=$(echo "$1" | ${bc}/bin/bc)
|
||||
echo "sleeping $time seconds, then saying: $2"
|
||||
${coreutils}/bin/sleep "$time" && {
|
||||
echo "$2" | ${espeak}/bin/espeak -v german-mbrola-6
|
||||
}
|
||||
''
|
||||
Reference in New Issue
Block a user