Fonts: Difference between revisions

imported>Hypnosis2839
imported>Vieta
the last revision does not work properly
Line 145: Line 145:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
system.fsPackages = [ pkgs.bindfs ];
  system.fsPackages = [ pkgs.bindfs ];
   fileSystems = let
   fileSystems = let
     mkRoSymBind = path: {
     mkRoSymBind = path: {
Line 151: Line 151:
       fsType = "fuse.bindfs";
       fsType = "fuse.bindfs";
       options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
       options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
    };
    aggregatedIcons = pkgs.buildEnv {
      name = "system-icons";
      paths = with pkgs; [
        #libsForQt5.breeze-qt5  # for plasma
        gnome.gnome-themes-extra
      ];
      pathsToLink = [ "/share/icons" ];
     };
     };
     aggregatedFonts = pkgs.buildEnv {
     aggregatedFonts = pkgs.buildEnv {
Line 158: Line 166:
     };
     };
   in {
   in {
    # Create an FHS mount to support flatpak host icons/fonts
     "/usr/share/icons" = mkRoSymBind "${aggregatedIcons}/share/icons";
     "/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons");
     "/usr/local/share/fonts" = mkRoSymBind "${aggregatedFonts}/share/fonts";
     "/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
  };
 
  fonts = {
    fontDir.enable = true;
    packages = with pkgs; [
      noto-fonts
      noto-fonts-emoji
      noto-fonts-cjk
    ];
   };
   };
</syntaxhighlight>
</syntaxhighlight>