dotfiles/home/apps/fonts.nix

33 lines
732 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
2024-05-07 18:20:52 +02:00
}:
{
2023-11-28 12:21:17 +01:00
config = lib.mkIf config.isGraphical {
home.activation = {
2024-05-07 18:20:52 +02:00
installCustomFonts =
let
fontDirectory =
if pkgs.stdenv.isDarwin then
"${config.home.homeDirectory}/Library/Fonts"
else
"${config.xdg.dataHome}/fonts";
fontPath = ../secrets/fonts;
in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
2023-11-28 12:21:17 +01:00
mkdir -p "${fontDirectory}"
install -Dm644 ${fontPath}/* "${fontDirectory}"
'';
};
home.packages = with pkgs; [
2024-05-07 18:20:52 +02:00
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
2023-11-28 12:21:17 +01:00
cascadia-code
victor-mono
ibm-plex
xkcd-font
];
};
2023-05-13 07:04:20 +02:00
}