Nixify hugo deployment

Create a derivation for building the static files of my blog.
This commit is contained in:
William Carroll 2020-03-09 15:14:49 +00:00
parent 6e4c721be5
commit b929a6bb57
2 changed files with 13 additions and 1 deletions

12
blog/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
pkgs.stdenv.mkDerivation {
name = "blog.wpcarro.dev";
buildInputs = with pkgs; [ hugo ];
src = ./.;
buildPhase = ''
mkdir -p $out
${pkgs.hugo}/bin/hugo --minify --destination $out
'';
dontInstall = true;
}

View file

@ -154,7 +154,7 @@ in {
"blog.wpcarro.dev" = { "blog.wpcarro.dev" = {
addSSL = true; addSSL = true;
enableACME = true; enableACME = true;
root = "/var/www/blog"; root = briefcase.blog;
}; };
}; };
}; };