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,41 +26,34 @@
nixpkgs,
zerm,
...
}: (flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
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 {
formatter = pkgs.alejandra;
devShells.default = let
commands = [
{package = pkgs.zola;}
];
startupScript = ''
mkdir -p themes
ln -snf "${zerm}" "themes/zerm"
'';
in
pkgs.devshell.mkShell {
inherit commands;
devshell.startup.themes.text = startupScript;
}:
(flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
];
};
in {
formatter = pkgs.alejandra;
devShells.default = let
commands = [
{package = pkgs.zola;}
];
startupScript = ''
mkdir -p themes
ln -snf "${zerm}" "themes/zerm"
'';
in
pkgs.devshell.mkShell {
inherit commands;
devshell.startup.themes.text = startupScript;
};
packages.default = pkgs.callPackage ./default.nix {inherit zerm;};
}))
// {
overlays.default = final: prev: {
www = prev.callPackage ./default.nix {inherit zerm;};
};
packages.default = pkg;
overlays.default = final: prev: {
www = pkg;
};
}));
}