Browse Source

Add build script to hugo module

main
parent
commit
88f7ea51af
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 5
      README.org
  2. 5
      modules/hugo.nix

5
README.org

@ -689,13 +689,16 @@ Apply some configuration to the default settings:
let let
mySiteDir = "/etc/dotfiles/docs/public/"; mySiteDir = "/etc/dotfiles/docs/public/";
mySiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding"; mySiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding";
mySiteBuild = pkgs.writeShellScriptBin "my-site-build" ''
pushd ${mySiteDir}../ && ${pkgs.hugo}/bin/hugo -v && popd
'';
mySiteUpdate = pkgs.writeShellScriptBin "my-site-update" '' mySiteUpdate = pkgs.writeShellScriptBin "my-site-update" ''
${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt} ${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt}
''; '';
in { in {
environment.systemPackages = [ environment.systemPackages = [
pkgs.hugo
mySiteBuild
mySiteUpdate mySiteUpdate
]; ];
} }

5
modules/hugo.nix

@ -4,13 +4,16 @@
let let
mySiteDir = "/etc/dotfiles/docs/public/"; mySiteDir = "/etc/dotfiles/docs/public/";
mySiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding"; mySiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding";
mySiteBuild = pkgs.writeShellScriptBin "my-site-build" ''
pushd ${mySiteDir}../ && ${pkgs.hugo}/bin/hugo -v && popd
'';
mySiteUpdate = pkgs.writeShellScriptBin "my-site-update" '' mySiteUpdate = pkgs.writeShellScriptBin "my-site-update" ''
${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt} ${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt}
''; '';
in { in {
environment.systemPackages = [ environment.systemPackages = [
pkgs.hugo
mySiteBuild
mySiteUpdate mySiteUpdate
]; ];
} }
Loading…
Cancel
Save