Fix overlay

This commit is contained in:
Avery Winters 2023-09-14 15:35:58 -05:00
parent df18811cb3
commit 8c8ad06439
No known key found for this signature in database
2 changed files with 45 additions and 35 deletions

17
default.nix Normal file
View file

@ -0,0 +1,17 @@
{
stdenv,
zola,
zerm,
}:
stdenv.mkDerivation {
pname = "averywinters.org";
version = "1.0.0";
src = ./.;
nativeBuildInputs = [zola];
configurePhase = ''
mkdir -p themes
ln -snf "${zerm}" "themes/zerm"
'';
buildPhase = "zola build";
installPhase = "cp -r public $out";
}

View file

@ -26,22 +26,13 @@
nixpkgs, nixpkgs,
zerm, zerm,
... ...
}: (flake-utils.lib.eachDefaultSystem (system: let }:
(flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [devshell.overlays.default]; overlays = [
}; devshell.overlays.default
pkg = pkgs.stdenv.mkDerivation { ];
pname = "averywinters.org";
version = "1.0.0";
src = ./.;
nativeBuildInputs = [pkgs.zola];
configurePhase = ''
mkdir -p themes
ln -snf "${zerm}" "themes/zerm"
'';
buildPhase = "zola build";
installPhase = "cp -r public $out";
}; };
in { in {
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
@ -58,9 +49,11 @@
inherit commands; inherit commands;
devshell.startup.themes.text = startupScript; devshell.startup.themes.text = startupScript;
}; };
packages.default = pkg; packages.default = pkgs.callPackage ./default.nix {inherit zerm;};
}))
// {
overlays.default = final: prev: { overlays.default = final: prev: {
www = pkg; www = prev.callPackage ./default.nix {inherit zerm;};
};
}; };
}));
} }