Browse Source

Add test script to run local server on http://localhost:1313

master
parent
commit
29268121b1
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 6
      flake.nix

6
flake.nix

@ -10,6 +10,11 @@
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};
myWeddingSiteDir = "$MY_WEDDING_SITE_DIR"; myWeddingSiteDir = "$MY_WEDDING_SITE_DIR";
myWeddingSiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding"; 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" '' myWeddingSiteBuild = pkgs.writeShellScriptBin "wedding-site-build" ''
pushd ${myWeddingSiteDir} > /dev/null && pushd ${myWeddingSiteDir} > /dev/null &&
${pkgs.hugo}/bin/hugo -v ; \ ${pkgs.hugo}/bin/hugo -v ; \
@ -22,6 +27,7 @@
rec { rec {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
myWeddingSiteTest
myWeddingSiteBuild myWeddingSiteBuild
myWeddingSiteUpdate myWeddingSiteUpdate
]; ];

Loading…
Cancel
Save