Files
vkane.cz/flake.nix
2025-07-03 14:37:54 +02:00

35 lines
954 B
Nix

{
description = "vkane.cz";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.hermit = {
url = "github:vojta001/hermit/tmp";
flake = false;
};
outputs = { self, nixpkgs, hermit }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
{
website = pkgs.stdenv.mkDerivation {
pname = "vkane.cz";
version = "";
src = self;
# the theme is included as a submodule, and with nix it is an alchemy whether it is somehow included or not (in which case the empty parent directory might be missing)
preConfigure = ''
rm --dir --force themes/hermit
mkdir -p themes
ln --symbolic '${hermit}' themes/hermit
'';
buildPhase = ''
'${pkgs.hugo}'/bin/hugo --buildExpired --buildFuture --destination "$out" --minify --printPathWarnings --printI18nWarnings
'';
dontInstall = true;
};
};
}