Fonts: Difference between revisions

Simplified the Flatpak font/icon/theme fixes part and made them directly use the host font/icon/theme instead of manually declaring separate packages
m concatenate the mountOptions into a single variable with explanation for "resolve-symlinks"
Line 379: Line 379:
{ pkgs, ... }:
{ pkgs, ... }:


let
  # Mount options for the bind mounts
  mountOptions = [
    "ro"
    "x-gvfs-hide"
    # Resolves symlinks as if they were real files
    # Needed for things like OnlyOffice
    "resolve-symlinks"
  ];
in
{
{
   # Bind mounts fonts, icons and themes from
   # Bind mounts fonts, icons and themes from
Line 395: Line 405:
     device = "/run/current-system/sw/share/X11/fonts";
     device = "/run/current-system/sw/share/X11/fonts";
     fsType = "fuse.bindfs";
     fsType = "fuse.bindfs";
     options = [
     options = mountOptions;
      "ro"
      "resolve-symlinks"
      "x-gvfs-hide"
    ];
   };
   };


Line 406: Line 412:
     device = "/run/current-system/sw/share/icons";
     device = "/run/current-system/sw/share/icons";
     fsType = "fuse.bindfs";
     fsType = "fuse.bindfs";
     options = [
     options = mountOptions;
      "ro"
      "resolve-symlinks"
      "x-gvfs-hide"
    ];
   };
   };


   # Themes
   # Themes
   fileSystems."/usr/share/themes" = {
   fileSystems."/usr/share/themes" = {
  device = "/run/current-system/sw/share/themes";
    device = "/run/current-system/sw/share/themes";
  fsType = "fuse.bindfs";
    fsType = "fuse.bindfs";
  options = [
    options = mountOptions;
    "ro"
    "resolve-symlinks"
    "x-gvfs-hide"
    ];
   };
   };
}
}