fix: flake overlay

This commit is contained in:
dusk 2021-05-18 23:10:21 +03:00
parent 1a3b70b4c3
commit 29f3122324
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -5,38 +5,36 @@
}; };
outputs = { self, flakeUtils, nixpkgs }: outputs = { self, flakeUtils, nixpkgs }:
flakeUtils.lib.eachDefaultSystem (system: let
let utils = import ./utils.nix;
utils = import ./utils.nix;
lib = { lib = {
# Convert Nix expressions to HTML # Convert Nix expressions to HTML
tags = import ./tags.nix { inherit utils; }; tags = import ./tags.nix { inherit utils; };
# Convert Nix expressions to CSS # Convert Nix expressions to CSS
css = import ./css.nix { inherit utils; }; css = import ./css.nix { inherit utils; };
# Various site templaters # Various site templaters
templaters = { templaters = {
# Basic templater with purecss, mobile responsive layout and supports posts # Basic templater with purecss, mobile responsive layout and supports posts
basic = import ./templaters/basic.nix; basic = import ./templaters/basic.nix;
};
}; };
};
pkgsLib = (final: prev: { overlay = final: prev: {
htmlNix = import ./pkgs-lib.nix { pkgs = prev; utils = utils // { inherit (lib) tags css; }; }; htmlNix = (import ./pkgs-lib.nix { pkgs = prev; utils = utils // { inherit (lib) tags css; }; }) // lib;
}); };
in
pkgs = import nixpkgs { inherit system; overlays = [ pkgsLib ]; }; { inherit overlay; } //
(flakeUtils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ overlay ]; };
in in
{ {
lib = lib // { lib = lib // {
pkgsLib = import ./pkgs-lib.nix { inherit pkgs; utils = utils // { inherit (lib) tags css; }; }; pkgsLib = import ./pkgs-lib.nix { inherit pkgs; utils = utils // { inherit (lib) tags css; }; };
}; };
overlays = {
inherit pkgsLib;
};
apps = with flakeUtils.lib; { apps = with flakeUtils.lib; {
site = mkApp { site = mkApp {
drv = import ./examples/site.nix { inherit lib pkgs; }; drv = import ./examples/site.nix { inherit lib pkgs; };
@ -51,5 +49,5 @@
examples = { examples = {
tags = import ./examples/tags.nix lib.tags; tags = import ./examples/tags.nix lib.tags;
}; };
}); }));
} }