Initial commit; Add flake.nix

This commit is contained in:
Evie Litherland-Smith 2023-11-23 13:09:16 +00:00
commit 8994ed707b

20
flake.nix Normal file
View file

@ -0,0 +1,20 @@
{
description = "My personal website content and configuration";
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.website = pkgs.stdenv.mkDerivation {
name = "homesite";
src = self;
buildPhase = "${pkgs.hugo}/bin/hugo";
installPhase = "cp -r public $out";
};
defaultPackage = self.packages.${system}.website;
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; };
});
}