about summary refs log tree commit diff homepage
path: root/live.nix
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-01-26 02:52:21 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-01-26 02:52:21 +0900
commitea1e82c58d4b36f5ac194f6b901425cdf99f2661 (patch)
tree2db28963f0aff04b822ad4c8ee5ff5c0cec98e60 /live.nix
parentf7720b2207b33fd60ef945662c261c1468e377f7 (diff)
downloadpx-ea1e82c58d4b36f5ac194f6b901425cdf99f2661.tar.gz
Add live reloading facilities
Diffstat (limited to 'live.nix')
-rw-r--r--live.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/live.nix b/live.nix
new file mode 100644
index 0000000..b18b5ad
--- /dev/null
+++ b/live.nix
@@ -0,0 +1,9 @@
+with import <nixpkgs> {};
+mkShell {
+  packages = [ busybox epeg libxslt webfs ];
+  shellHook = ''
+    make -j $(nproc) live
+    webfsd -p 28792 -f index.xml
+    trap "kill $(pgrep -f 'webfsd -p 28792')" EXIT INT TERM
+  '';
+}