Skip to content

Instantly share code, notes, and snippets.

@chris-martin
Last active December 1, 2017 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-martin/41a4808d2ce4a3299a59544d53153c1b to your computer and use it in GitHub Desktop.
Save chris-martin/41a4808d2ce4a3299a59544d53153c1b to your computer and use it in GitHub Desktop.
{
fonts.fonts = [
pkgs.corefonts
pkgs.fira
pkgs.fira-code
pkgs.fira-mono
pkgs.lato
pkgs.inconsolata
pkgs.symbola
pkgs.ubuntu_font_family
pkgs.unifont
pkgs.vistafonts
(pkgs.runCommand "yourfontname" { } ''
mkdir --parents $out/share/fonts
ln -s ${/home/you/yourfont} --target-directory=$out/share/fonts
'')
];
}
@i-am-the-slime
Copy link

I have this now:

  # Fonts
  # fonts.enableCoreFonts = true;
  fonts.fonts = [
    pkgs.iosevka
    pkgs.runCommand "pragmatapro" { } ''
      mkdir --parents $out/share/fonts
      ln -s ${/home/mark/.fonts/pragmatapro} --target-directory=$out/share/fonts
    ''
  ];

And it says error: cannot coerce a function to a string, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:170:42

Any hint?

@i-am-the-slime
Copy link

i-am-the-slime commented Dec 1, 2017

I was missing the parens!
It works now, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment