Website for Chris & Scotia 2023
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
969 B

  1. {
  2. description = "Wedding site for Chris & Scotia 2023.";
  3. inputs = {
  4. flake-utils.url = "github:numtide/flake-utils";
  5. };
  6. outputs = inputs @ { self, nixpkgs, ... }:
  7. inputs.flake-utils.lib.eachDefaultSystem (system:
  8. let pkgs = nixpkgs.legacyPackages.${system};
  9. weddingSiteDir = "$HOME/.local/source/wedding-site/public/";
  10. weddingSiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding";
  11. weddingSiteBuild = pkgs.writeShellScriptBind "wedding-site-build" ''
  12. pushd ${weddingSiteDir}../ && ${pkgs.hugo}/bin/hugo -v && popd
  13. '';
  14. weddingSiteUpdate = pkgs.writeShellScriptBin "wedding-site-update" ''
  15. ${pkgs.rsync}/bin/rsync -aP ${weddingSiteDir} ${weddingSiteTgt}
  16. '';
  17. in
  18. rec {
  19. devShell = pkgs.mkShell {
  20. buildInputs = with pkgs; [
  21. weddingSiteBuild
  22. weddingSiteUpdate
  23. ];
  24. };
  25. }
  26. );
  27. }