diff options
| author | triethyl <triethylammonium@pm.me> | 2025-09-11 13:06:03 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-09-11 13:06:03 -0400 |
| commit | 7d8b653b2299f11536da47ed4412d82bb4ffb99d (patch) | |
| tree | b301d3aff7c17cbd430ff47cf4bf6bf2b044e786 /flake.nix | |
initialized
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d487c67 --- /dev/null +++ b/flake.nix @@ -0,0 +1,47 @@ +{ + description = "Personal website"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + systems.url = "github:nix-systems/default"; + flake-utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; + }; + }; + + outputs = { + nixpkgs, + flake-utils, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = nixpkgs.legacyPackages.${system}; + lib = pkgs.lib; + in { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + hugo + ]; + }; + packages.default = pkgs.stdenv.mkDerivation { + pname = "personal-website"; + version = "1.0"; + + src = ./site; + + nativeBuildInputs = [pkgs.hugo]; + + buildPhase = '' + hugo --minify + ''; + + installPhase = '' + mkdir -p $out + cp -r public/* $out + ''; + }; + } + ); +} |
