This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity.eu/default.nix
2024-11-08 15:15:45 +01:00

51 lines
972 B
Nix

{ sources ? import ./npins
, system ? builtins.currentSystem
, pkgs ? import sources.nixpkgs {
inherit system;
config = { };
overlays = [ ];
}
, lib ? import "${sources.nixpkgs}/lib"
}:
let
lib' = final: prev:
let
new = import ./lib.nix { lib = final; };
in
new // { types = prev.recursiveUpdate prev.types new.types; };
lib'' = lib.extend lib';
in
rec {
lib = import ./lib.nix { inherit lib; };
result = lib''.evalModules {
modules = [
./structure
./content
./presentation
{
_module.args = {
inherit pkgs;
};
}
];
};
inherit (result.config) build;
shell = pkgs.mkShellNoCC {
packages = with pkgs; [
cmark
npins
watchexec
];
shellHook = ''
cat << EOF
For incremental rebuilds:
echo watchexec -e nix "nix-build -A build"
firefox --new-tab file:///${toString ./.}/result/index.html
EOF
'';
};
}