Fonts: Difference between revisions
imported>ThatLeaflet Adds warning about granting filesystem access to flatpak apps. Some apps, such as Steam, will refuse to launch if given too much filesystem access. |
imported>Vieta m fonts.fonts --> fonts.packages ; bindfs for font support |
||
| Line 9: | Line 9: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
fonts. | fonts.packages = with pkgs; [ | ||
noto-fonts | noto-fonts | ||
noto-fonts-cjk | noto-fonts-cjk | ||
| Line 53: | Line 53: | ||
fonts = { | fonts = { | ||
enableDefaultFonts = true; | enableDefaultFonts = true; | ||
packages = with pkgs; [ | |||
ubuntu_font_family | ubuntu_font_family | ||
| Line 79: | Line 79: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
fonts = { | fonts = { | ||
packages = with pkgs; [ gyre-fonts ]; | |||
fontconfig = { | fontconfig = { | ||
localConf = '' | localConf = '' | ||
| Line 142: | Line 142: | ||
It is important to keep in mind that some flatpak apps may refuse to launch if given certain permissions, such as the Steam flatpak. | It is important to keep in mind that some flatpak apps may refuse to launch if given certain permissions, such as the Steam flatpak. | ||
=== Using bindfs for font support === | |||
<syntaxhighlight lang="nix"> | |||
system.fsPackages = [ pkgs.bindfs ]; | |||
fileSystems = let | |||
mkRoSymBind = path: { | |||
device = path; | |||
fsType = "fuse.bindfs"; | |||
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ]; | |||
}; | |||
aggregatedFonts = pkgs.buildEnv { | |||
name = "system-fonts"; | |||
paths = config.fonts.packages; | |||
pathsToLink = [ "/share/fonts" ]; | |||
}; | |||
in { | |||
# Create an FHS mount to support flatpak host icons/fonts | |||
"/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons"); | |||
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts"); | |||
}; | |||
</syntaxhighlight> | |||
<hr /> | <hr /> | ||
[[Category:Configuration]] | [[Category:Configuration]] | ||