aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/default.nix26
1 files changed, 23 insertions, 3 deletions
diff --git a/scripts/default.nix b/scripts/default.nix
index 84fcff3..a6e5936 100644
--- a/scripts/default.nix
+++ b/scripts/default.nix
@@ -1,17 +1,31 @@
1{ pkgs, ... }: 1{ pkgs, ... }:
2 2
3let 3let
4 4
5 # open a window with live video feed from the camera 5 # open a window with live video feed from the camera
6 webcam = pkgs.writeScriptBin "webcam" '' 6 webcam = pkgs.writeScriptBin "webcam" ''
7 ${pkgs.mpv}/bin/mpv av://v4l2:/dev/video0 --profile=low-latency --untimed 7 ${pkgs.mpv}/bin/mpv av://v4l2:/dev/video0 --profile=low-latency --untimed
8 ''; 8 '';
9 9
10 # create new repo on fern
11 git-new-repo = pkgs.writeScriptBin "git-new-repo" ''
12 if [ $# -eq 0 ]; then
13 echo "requires an arg"
14 exit 1
15 fi
16
17 # $1 - section/repo-name
18
19 ssh git@ferrn git init --bare "$1";
20 git remote add origin git@ferrn:"$1";
21 git push -u origin HEAD;
22 '';
23
10 # set git repo descriptions on cgit 24 # set git repo descriptions on cgit
11 git-set-desc = pkgs.writeScriptBin "git-set-desc" '' 25 git-set-desc = pkgs.writeScriptBin "git-set-desc" ''
12 remote=$(git remote get-url --push origin) 26 remote=$(git remote get-url --push origin)
13 scp .git/description "$remote/description" 27 scp .git/description "$remote/description"
14 ''; 28 '';
15 29
16 # screen record with ffmpeg and slop 30 # screen record with ffmpeg and slop
17 record = import ./record.nix pkgs; 31 record = import ./record.nix pkgs;
@@ -23,4 +37,10 @@ let
23 battery = import ./battery.nix pkgs; 37 battery = import ./battery.nix pkgs;
24 38
25in 39in
26 [ webcam git-set-desc record uploader battery ] 40[
41 webcam
42 git-set-desc
43 record
44 uploader
45 battery
46]