From 88f7ea51af5b1cf6302f0dd81995b4fd9cb1eec5 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Mon, 11 Apr 2022 19:45:04 -0400 Subject: [PATCH] Add build script to hugo module --- README.org | 5 ++++- modules/hugo.nix | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 7f8281f..a2eedfc 100644 --- a/README.org +++ b/README.org @@ -689,13 +689,16 @@ Apply some configuration to the default settings: let mySiteDir = "/etc/dotfiles/docs/public/"; 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" '' ${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt} ''; in { environment.systemPackages = [ - pkgs.hugo + mySiteBuild mySiteUpdate ]; } diff --git a/modules/hugo.nix b/modules/hugo.nix index e38b28d..529cec8 100644 --- a/modules/hugo.nix +++ b/modules/hugo.nix @@ -4,13 +4,16 @@ let mySiteDir = "/etc/dotfiles/docs/public/"; 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" '' ${pkgs.rsync}/bin/rsync -aP ${mySiteDir} ${mySiteTgt} ''; in { environment.systemPackages = [ - pkgs.hugo + mySiteBuild mySiteUpdate ]; }