diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a66674b --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + description = "My blog"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + }; + + outputs = + { self, nixpkgs }: + { + packages.x86_64-linux.default = nixpkgs.lib.cleanSource (nixpkgs.callPackage ./hub.nix { }); + }; +} diff --git a/hub.nix b/hub.nix new file mode 100644 index 0000000..3da8e5c --- /dev/null +++ b/hub.nix @@ -0,0 +1,12 @@ +{ fetchurl, hugo, ... }: + +hugo.overrideAttrs (old: { + buildPhase = '' + hugo --minify + ''; + + installPhase = '' + mkdir -p $out + cp -r public/* $out/ + ''; +})