diff options
author | Akshay <[email protected]> | 2021-09-26 16:56:36 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-09-26 16:56:36 +0100 |
commit | 5cdb4e421a809de51c3ebe8404e50d732721238b (patch) | |
tree | 73b71617c41b3e13edbf26035e821bb884d30441 /scripts/default.nix |
init
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 ] | ||