This commit is contained in:
Daniella / Tove 2024-10-30 01:16:16 +01:00
parent 17c8150bc9
commit 3f2131f296
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 14 additions and 0 deletions

View file

@ -48,6 +48,7 @@ in
dogdns
#marker.pkgs.end#
(import ./traewelling.script.nix)
(import ./plans.script.nix)
] ++ (with pkgs; [
freecad
nheko

13
plans.script.nix Normal file
View file

@ -0,0 +1,13 @@
with import <nixpkgs> {};
pkgs.writeShellScriptBin "plans" ''
#!/bin/sh
if [ "$1" = "add" ] ; then
echo "$2" >> ~/sync/plans.txt
fi
if [ "$1" = "done" ] ; then
tail -n"$(($(wc -l < ~/sync/plans.txt) - 1))" ~/sync/plans.txt
fi
cat ~/sync/plans.txt
''