From 14ae098c18f143e35b6b952d35e90a074de701d5 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Sat, 6 Jan 2024 01:01:01 +0100 Subject: [PATCH] Adds nix package and overlay --- flake.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/flake.nix b/flake.nix index ea4ce18..5a5a666 100644 --- a/flake.nix +++ b/flake.nix @@ -27,5 +27,22 @@ ' ''; }; + + packages.${system}.default = pkgs.stdenv.mkDerivation { + name = "ctrlz.es"; + src = ./.; + buildInputs = with pkgs; [hugo]; + + unpackPhase = false; + + buildPhase = "hugo"; + + installPhase = '' + mkdir -p $out/var/lib/ctrlz.es + cp -r public/* $out/var/lib/ctrlz.es/ + ''; + }; + + overlays.default = final: prev: {ctrlz = self.packages.${system}.default;}; }; }