about summary refs log tree commit diff
path: root/blog/default.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-09T15·14+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-09T15·35+0000
commitb929a6bb57a3e57e5bdacb12146bb28a57579f9c (patch)
tree26ae961c069e19231d8e8458c2a10321ade5bfc9 /blog/default.nix
parent6e4c721be5fd3483da7fa3de4b85659552494a49 (diff)
Nixify hugo deployment
Create a derivation for building the static files of my blog.
Diffstat (limited to 'blog/default.nix')
-rw-r--r--blog/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/blog/default.nix b/blog/default.nix
new file mode 100644
index 000000000000..437f5cc108d7
--- /dev/null
+++ b/blog/default.nix
@@ -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;
+}