resumee-website/flake.nix

30 lines
1 KiB
Nix
Raw Normal View History

2024-04-06 17:30:45 +02:00
{
# Source: https://yejun.dev/posts/static-website-with-hugo-and-nix/
description = "My personal website";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
2024-04-06 17:53:34 +02:00
inputs.flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
2024-04-06 17:30:45 +02:00
2024-04-06 17:53:34 +02:00
outputs = { self, nixpkgs, flake-utils, flake-compat }:
2024-04-06 17:30:45 +02:00
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
packages.resumee-website = pkgs.stdenv.mkDerivation {
name = "resumee-website";
src = self;
2024-04-06 17:39:16 +02:00
nativeBuildInputs = [ pkgs.git pkgs.go pkgs.hugo ];
buildPhase = "hugo -d $out";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-k46/umNJ9Q8FsZDCRvG/YmyU3IAkL5bzTvhWxdbNXso=";
2024-04-06 17:30:45 +02:00
};
defaultPackage = self.packages.${system}.resumee-website;
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; };
});
}