Add flake and fix config.toml

remove theme.toml

It appears you based the repo on a theme or something?
This commit is contained in:
Artturin 2025-04-29 22:16:00 +03:00
parent 218f422b9a
commit 32a0e09123
4 changed files with 143 additions and 17 deletions

73
flake.nix Normal file
View file

@ -0,0 +1,73 @@
{
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
utils.url = "github:numtide/flake-utils";
};
outputs =
inputs:
inputs.utils.lib.eachDefaultSystem (
system:
let
pkgs = import inputs.nixpkgs {
localSystem = system;
overlays = [
(final: prev: {
bluespec-docs = prev.callPackage (
{
stdenv,
zola,
git,
}:
stdenv.mkDerivation ({
pname = "bluespec-docs";
version = "0.1.0";
src = inputs.self;
nativeBuildInputs = [
zola
git
];
buildPhase = ''
zola build
'';
installPhase = ''
mkdir -p $out
cp -r public $out
'';
})
) { };
serve-site = prev.writers.writeBashBin "serve-site" ''
${prev.lib.getExe prev.zola} build --base-url ""
${prev.lib.getExe prev.python3} -m http.server --bind 127.0.0.1 8081 --directory ./public
'';
})
];
};
in
{
packages = {
default = inputs.self.packages."${system}".bluespec-docs;
bluespec-docs = pkgs.bluespec-docs;
};
apps = {
# `nix run` will run this
default = {
type = "app";
program = "${pkgs.serve-site}/bin/serve-site";
};
};
devShells.default =
with pkgs;
mkShell {
inputsFrom = [ bluespec-docs ];
};
}
);
}