commit 8994ed707b8c4decca74ac844a60e2f4d90e774c Author: Evie Litherland-Smith Date: Thu Nov 23 13:09:16 2023 +0000 Initial commit; Add flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f7dc611 --- /dev/null +++ b/flake.nix @@ -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 ]; }; + }); +}