diff --git a/README.org b/README.org index 230a6c0..56f7a78 100644 --- a/README.org +++ b/README.org @@ -680,21 +680,23 @@ Apply some configuration to the default settings: ./modules/hugo.nix #+END_SRC -[[https://gohugo.io][Hugo]] is one of the most popular open-source static site generators. +[[https://gohugo.io][Hugo]] is one of the most popular open-source static site generators. I use it to build https://chrishayward.xyz which is included in a later section of this configuration. This module adds a custom package to push the site to the server. #+BEGIN_SRC nix :noweb yes :tangle modules/hugo.nix # <> { config, pkgs, ... }: let - myUpdateSite = pkgs.writeShellScriptBin "update-site" '' - rsync -aP /etc/dotfiles/docs/public/ ubuntu@chrishayward.xyz:/var/www/chrishayward + mySiteDir = "/etc/dotfiles/docs/public/"; + mySiteTgt = "unbuntu@chrishayward.xyz:/var/www/wedding"; + mySiteUpdate = pkgs.writeShellScriptBin "my-site-update" '' + ${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt} ''; in { environment.systemPackages = [ pkgs.hugo - myUpdateSite + mySiteUpdate ]; } #+END_SRC diff --git a/modules/hugo.nix b/modules/hugo.nix index 30e3ee9..2b143cc 100644 --- a/modules/hugo.nix +++ b/modules/hugo.nix @@ -2,13 +2,15 @@ { config, pkgs, ... }: let - myUpdateSite = pkgs.writeShellScriptBin "update-site" '' - rsync -aP /etc/dotfiles/docs/public/ ubuntu@chrishayward.xyz:/var/www/chrishayward + mySiteDir = "/etc/dotfiles/docs/public/"; + mySiteTgt = "unbuntu@chrishayward.xyz:/var/www/wedding"; + mySiteUpdate = pkgs.writeShellScriptBin "my-site-update" '' + ${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt} ''; in { environment.systemPackages = [ pkgs.hugo - myUpdateSite + mySiteUpdate ]; }