my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux

feat: custom fonts

+43 -11
+2
.gitattributes
··· 4 4 # treat age files as binarys 5 5 *.age -text -diff 6 6 7 + secrets/fonts/** filter=git-crypt diff=git-crypt 8 + 7 9 # templates should not register on linguist 8 10 parts/templates/* linguist-vendored
-3
home/isabel/gui/ghostty.nix
··· 18 18 window-save-state = "always"; 19 19 20 20 font-family = config.garden.style.fonts.name; 21 - font-family-bold = config.garden.style.fonts.bold; 22 - font-family-italic = config.garden.style.fonts.italic; 23 - font-family-bold-italic = config.garden.style.fonts.bold-italic; 24 21 font-size = 13; 25 22 }; 26 23 };
+1
home/isabel/themes/default.nix
··· 2 2 imports = [ 3 3 # keep-sorted start 4 4 ./catppuccin.nix 5 + ./fonts.nix 5 6 ./global.nix 6 7 ./gtk.nix 7 8 ./qt.nix
+30
home/isabel/themes/fonts.nix
··· 1 + { 2 + lib, 3 + pkgs, 4 + self, 5 + config, 6 + ... 7 + }: 8 + let 9 + fontdir = 10 + if pkgs.stdenv.hostPlatform.isDarwin then 11 + "${config.home.homeDirectory}/Library/Fonts" 12 + else 13 + "${config.xdg.dataHome}/fonts"; 14 + in 15 + { 16 + home.activation = lib.mkIf config.garden.style.fonts.enable { 17 + installCustomFonts = 18 + lib.hm.dag.entryAfter [ "writeBoundary" ] 19 + # bash 20 + '' 21 + mkdir -p "${fontdir}" 22 + install -Dm644 ${self}/secrets/fonts/* "${fontdir}" 23 + ''; 24 + }; 25 + 26 + garden.style.fonts = { 27 + name = "Berkeley Mono"; 28 + package = null; 29 + }; 30 + }
+1
modules/flake/programs/shell.nix
··· 18 18 pkgs.just # quick and easy task runner 19 19 pkgs.cocogitto # git helpers 20 20 pkgs.gitMinimal # we need git 21 + pkgs.git-crypt # git-crypt for encrypted git repositories 21 22 pkgs.sops # secrets management 22 23 config.formatter # nix formatter 23 24 pkgs.nix-output-monitor # get clean diff between generations
+9 -8
modules/home/themes/fonts.nix
··· 6 6 }: 7 7 let 8 8 inherit (lib) mkIf mkOption mkEnableOption; 9 - inherit (lib.types) str int package; 9 + inherit (lib.types) 10 + str 11 + int 12 + package 13 + nullOr 14 + ; 10 15 11 16 cfg = config.garden.style.fonts; 12 17 in ··· 41 46 }; 42 47 43 48 package = mkOption { 44 - type = package; 49 + type = nullOr package; 45 50 description = "The package that provides the font"; 46 51 default = pkgs.maple-mono.truetype; 47 52 }; ··· 54 59 }; 55 60 56 61 config = mkIf cfg.enable { 57 - garden.packages = { 58 - ${cfg.package.name} = cfg.package; 59 - }; 60 - 61 62 fonts.fontconfig = { 62 63 enable = true; 63 64 ··· 83 84 }; 84 85 }; 85 86 86 - garden.packages = { 87 - ${cfg.name} = cfg.package; 87 + garden.packages = mkIf (cfg.package != null) { 88 + ${cfg.package.name} = cfg.package; 88 89 }; 89 90 }; 90 91 }
secrets/fonts/BerkeleyMono-Bold.ttf

This is a binary file and will not be displayed.

secrets/fonts/BerkeleyMono-BoldItalic.ttf

This is a binary file and will not be displayed.

secrets/fonts/BerkeleyMono-Italic.ttf

This is a binary file and will not be displayed.

secrets/fonts/BerkeleyMono-Regular.ttf

This is a binary file and will not be displayed.

secrets/fonts/BerkeleyMonoVariable-Italic.ttf

This is a binary file and will not be displayed.

secrets/fonts/BerkeleyMonoVariable-Regular.ttf

This is a binary file and will not be displayed.