Files
nix/modules/home-manager/profiles/gfonts.nix
Gustavo "Guz" L. de Mello 0cb55603c9 feat: cantarell-fonts
2024-09-02 09:33:07 -03:00

42 lines
1.1 KiB
Nix

{
config,
pkgs,
lib,
...
}: let
cfg = config.profiles.gfonts;
in {
options.profiles.gfonts = with lib;
with lib.types; {
enable = mkEnableOption "";
};
config = with lib;
mkIf cfg.enable {
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
cantarell-fonts
google-fonts
(nerdfonts.override {fonts = ["FiraCode"];})
(stdenv.mkDerivation rec {
pname = "calsans";
version = "1.0.0";
src = pkgs.fetchzip {
url = "https://github.com/calcom/font/releases/download/v${version}/CalSans_Semibold_v${version}.zip";
stripRoot = false;
hash = "sha256-JqU64JUgWimJgrKX3XYcml8xsvy//K7O5clNKJRGaTM=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype fonts/webfonts/*.ttf
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/calcom/font";
license = licenses.ofl;
platforms = platforms.all;
};
})
];
};
}