diff options
author | Emilio Perez <emilio.perez-juarez@diamond.ac.uk> | 2020-09-01 15:38:06 +0100 |
---|---|---|
committer | Emilio Perez <emilio.perez-juarez@diamond.ac.uk> | 2020-10-04 14:56:30 +0100 |
commit | f41f53dc49d4d593bfeb977c05b8a730fd3654dd (patch) | |
tree | 526024e85003be7175ca4c0bfcd67ea759c67156 /nixos/modules/config | |
parent | c99bd9bedf7291390c28eddb31f8ed2aeec8ea7f (diff) |
nixos/fontdir: add option to decompress fonts
This will let Xwayland use the global font folder as font path
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/fonts/fontdir.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/config/fonts/fontdir.nix b/nixos/modules/config/fonts/fontdir.nix index be06991063c63..282f2425b061f 100644 --- a/nixos/modules/config/fonts/fontdir.nix +++ b/nixos/modules/config/fonts/fontdir.nix @@ -10,6 +10,9 @@ let find ${toString config.fonts.fonts} -regex "$font_regexp" \ -exec ln -sf -t "$out/share/X11/fonts" '{}' \; cd "$out/share/X11/fonts" + ${optionalString config.fonts.fontDir.decompressFonts '' + ${pkgs.gzip}/bin/gunzip -f *.gz + ''} ${pkgs.xorg.mkfontscale}/bin/mkfontscale ${pkgs.xorg.mkfontdir}/bin/mkfontdir cat $(find ${pkgs.xorg.fontalias}/ -name fonts.alias) >fonts.alias @@ -31,6 +34,14 @@ in ''; }; + decompressFonts = mkOption { + type = types.bool; + default = false; + description = '' + Whether to decompress fonts in + <filename>/run/current-system/sw/share/X11/fonts</filename>. + ''; + }; }; }; |