resumee-website/flake.nix

23 lines
758 B
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";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
packages.resumee-website = pkgs.stdenv.mkDerivation {
name = "resumee-website";
src = self;
buildPhase = "${pkgs.hugo}/bin/hugo";
installPhase = "cp -r public $out";
};
defaultPackage = self.packages.${system}.resumee-website;
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; };
});
}