27 lines
824 B
Nix
27 lines
824 B
Nix
{ pkgs, config, ... }:
|
|
|
|
{
|
|
# Using bindfs to create FHS font & icon directory
|
|
system.fsPackages = [ pkgs.bindfs ];
|
|
fileSystems = let
|
|
mkRoSymBind = path: {
|
|
device = path;
|
|
fsType = "fuse.bindfs";
|
|
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
|
|
};
|
|
aggregatedIcons = pkgs.buildEnv {
|
|
name = "system-icons";
|
|
paths = with pkgs; [ breeze-qt5 papirus-icon-theme ];
|
|
pathsToLink = [ "/share/icons" ];
|
|
};
|
|
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 "${aggregatedIcons}/share/icons";
|
|
"/usr/share/fonts" = mkRoSymBind "${aggregatedFonts}/share/fonts";
|
|
};
|
|
}
|