summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..b4c5334
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,25 @@
+{
+ inputs = {
+ nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
+ };
+
+ outputs = { self, nixpkgs }: let
+ system = "aarch64-darwin";
+ pkgs = nixpkgs.legacyPackages.${system};
+
+ fonts = with pkgs; [ gyre-fonts ];
+ in {
+ devShells.${system} = rec {
+ rastertype = pkgs.mkShell {
+ packages = [ pkgs.typst ];
+ shellHook = ''
+ export TYPST_FONT_PATHS="${pkgs.symlinkJoin { name = "rastertype-fonts"; paths = fonts; }}/share/fonts"
+ export TYPST_IGNORE_SYSTEM_FONTS=true
+ export TYPST_IGNORE_EMBEDDED_FONTS=true
+ export TYPST_FEATURES=html
+ '';
+ };
+ default = rastertype;
+ };
+ };
+}