diff options
Diffstat (limited to 'scripts/default.nix')
-rw-r--r-- | scripts/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/default.nix b/scripts/default.nix new file mode 100644 index 0000000..84fcff3 --- /dev/null +++ b/scripts/default.nix | |||
@@ -0,0 +1,26 @@ | |||
1 | { pkgs, ... }: | ||
2 | |||
3 | let | ||
4 | |||
5 | # open a window with live video feed from the camera | ||
6 | webcam = pkgs.writeScriptBin "webcam" '' | ||
7 | ${pkgs.mpv}/bin/mpv av://v4l2:/dev/video0 --profile=low-latency --untimed | ||
8 | ''; | ||
9 | |||
10 | # set git repo descriptions on cgit | ||
11 | git-set-desc = pkgs.writeScriptBin "git-set-desc" '' | ||
12 | remote=$(git remote get-url --push origin) | ||
13 | scp .git/description "$remote/description" | ||
14 | ''; | ||
15 | |||
16 | # screen record with ffmpeg and slop | ||
17 | record = import ./record.nix pkgs; | ||
18 | |||
19 | # file uploader | ||
20 | uploader = import ./up.nix pkgs; | ||
21 | |||
22 | # battery script | ||
23 | battery = import ./battery.nix pkgs; | ||
24 | |||
25 | in | ||
26 | [ webcam git-set-desc record uploader battery ] | ||