diff --git a/flake.nix b/flake.nix index 95e79d7..9c91379 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,11 @@ let pkgs = nixpkgs.legacyPackages.${system}; myWeddingSiteDir = "$MY_WEDDING_SITE_DIR"; myWeddingSiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding"; + myWeddingSiteTest = pkgs.writeShellScriptBin "wedding-site-test" '' + pushd ${myWeddingSiteDir} > /dev/null && + ${pkgs.hugo}/bin/hugo -v && ${pkgs.hugo}/bin/hugo server ; \ + popd > /dev/null + ''; myWeddingSiteBuild = pkgs.writeShellScriptBin "wedding-site-build" '' pushd ${myWeddingSiteDir} > /dev/null && ${pkgs.hugo}/bin/hugo -v ; \ @@ -22,6 +27,7 @@ rec { devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ + myWeddingSiteTest myWeddingSiteBuild myWeddingSiteUpdate ];