about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-04-18 17:10:28 +0200
committerAlan Pearce2024-04-18 17:34:15 +0200
commit320d0cbf276a89ac38e3b90b8cfc129a721adf95 (patch)
tree5252a4435420b46257859f6e076156611c40ad6e
parent656815a240bf56b6c46096d7875de1e04bc7c4a3 (diff)
downloadwebsite-320d0cbf276a89ac38e3b90b8cfc129a721adf95.tar.lz
website-320d0cbf276a89ac38e3b90b8cfc129a721adf95.tar.zst
website-320d0cbf276a89ac38e3b90b8cfc129a721adf95.zip
Add scripts for live-reloading incl. direnv
-rw-r--r--flake.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 5f70ae0..e5a2ebb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -32,6 +32,12 @@
                 gomod2nix.packages.${system}.default
                 gci
                 flyctl
+                (writeShellScriptBin "watch-builder" ''
+                  watchexec -r -w flake.nix --shell fish 'direnv exec . watchexec -w templates -w cmd/build -r go run ./cmd/build'
+                '')
+                (writeShellScriptBin "watch-server" ''
+                  watchexec -r -w flake.nix --shell fish 'direnv exec . watchexec -r go run ./server.go'
+                '')
               ] ++ nativeBuildInputs;
             };
           };