From 320d0cbf276a89ac38e3b90b8cfc129a721adf95 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 18 Apr 2024 17:10:28 +0200 Subject: Add scripts for live-reloading incl. direnv --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) 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; }; }; -- cgit 1.4.1