remove hugo's build lock and add flake overlay

This commit is contained in:
Victor Mignot 2024-09-28 21:44:54 +02:00
parent 9546c8929f
commit 2a70183c5f
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
5 changed files with 35 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
result/ result/
public/ public/
resources/ resources/
.hugo_build_lock

View file

18
default.nix Normal file
View file

@ -0,0 +1,18 @@
{ stdenv, lib, hugo, ... }:
stdenv.mkDerivation {
name = "dalaran.fr";
src = lib.cleanSource ./.;
nativeBuildInputs = [
hugo
];
buildPhase = ''
hugo --minify
'';
installPhase = ''
mv public $out
'';
}

11
flake.nix Normal file
View file

@ -0,0 +1,11 @@
{
description = "Victor Mignot's blog";
inputs = { };
outputs = { self, ... }: {
overlays.default = final: prev: {
dalaran-fr-blog = prev.callPackage ./default.nix { };
};
};
}

View file

@ -2,6 +2,11 @@
pkgs.mkShell { pkgs.mkShell {
name = "hugo-shell"; name = "hugo-shell";
packages = with pkgs; [
nixfmt-rfc-style
nil
];
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
hugo hugo
]; ];