diff options
Diffstat (limited to 'home/typst.nix')
| -rwxr-xr-x | home/typst.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/home/typst.nix b/home/typst.nix index a5b1147..0bdf352 100755 --- a/home/typst.nix +++ b/home/typst.nix @@ -1,7 +1,11 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: let dots = toString ./..; + packagePath = "typst/packages/local/grace-personal-template/0.1.0"; + template = { + source = config.lib.file.mkOutOfStoreSymlink "${dots}/typst"; + }; in { fonts.fontconfig.enable = true; @@ -15,6 +19,11 @@ in home.sessionVariables.TYPST_FONT_PATHS = "${config.home.profileDirectory}/share/fonts"; - home.file."Library/Application Support/typst/packages/local/grace-personal-template/0.1.0".source = - config.lib.file.mkOutOfStoreSymlink "${dots}/typst"; + home.file = lib.optionalAttrs pkgs.stdenv.isDarwin { + "Library/Application Support/${packagePath}" = template; + }; + + xdg.dataFile = lib.optionalAttrs pkgs.stdenv.isLinux { + "${packagePath}" = template; + }; } |
