feat: serve path script, pkgs lib overlay
This commit is contained in:
parent
d7671bf1ba
commit
c73ac62ffb
@ -5,15 +5,22 @@
|
||||
let
|
||||
tagsPath = ./tags.nix;
|
||||
libPath = ./lib.nix;
|
||||
pkgsLibPath = ./pkgs-lib.nix;
|
||||
|
||||
lib = import libPath;
|
||||
in
|
||||
{
|
||||
lib = {
|
||||
inherit tagsPath libPath;
|
||||
inherit tagsPath libPath pkgsLibPath;
|
||||
|
||||
tags = import tagsPath { format = true; inherit lib; };
|
||||
core = lib;
|
||||
};
|
||||
|
||||
overlays = {
|
||||
pkgsLib = (final: prev: {
|
||||
htmlNix = import pkgsLibPath { inherit lib; pkgs = prev; };
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
8
pkgs-lib.nix
Normal file
8
pkgs-lib.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ lib ? import ./lib.nix, pkgs }:
|
||||
let pkgBin = name: "${pkgs.${name}}/bin/${name}"; in
|
||||
{
|
||||
mkServePathScript = path: pkgs.writeScriptBin "serve" { } ''
|
||||
#!${pkgBin "bash"}
|
||||
${pkgBin "miniserve"} --index index.html ${path}
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user