feat: add flakeSelf and package.nix for course notes

This commit is contained in:
Youwen Wu 2025-01-06 15:44:51 -08:00
parent 9d108e3871
commit 1ff976cd36
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,37 @@
{
pkgs,
typstPackagesCache,
typixLib,
cleanTypstSource,
flakeSelf,
...
}:
let
src = cleanTypstSource ./.;
commonArgs = {
typstSource = "main.typ";
fontPaths = [
# Add paths to fonts here
# "${pkgs.roboto}/share/fonts/truetype"
];
virtualPaths = [
# Add paths that must be locally accessible to typst here
# {
# dest = "icons";
# src = "${inputs.font-awesome}/svgs/regular";
# }
];
XDG_CACHE_HOME = typstPackagesCache;
SOURCE_DATE_EPOCH = builtins.toString flakeSelf.lastModified;
};
in
typixLib.buildTypstProject (
commonArgs
// {
inherit src;
}
)

View file

@ -66,6 +66,7 @@
let let
alexandriaLib = import ./nix/lib { alexandriaLib = import ./nix/lib {
inherit pkgs typixLib typstPackagesCache; inherit pkgs typixLib typstPackagesCache;
flakeSelf = self;
}; };
in in