flatpak temp font and icon fix

This commit is contained in:
William 2024-03-10 11:06:56 -03:00
parent 5db6bb3d47
commit f1b5f0fde9
2 changed files with 28 additions and 0 deletions

View file

@ -3,6 +3,7 @@
{
imports = [
./boot.nix
./flatpakfix.nix
./hardware.nix
./home-manager.nix
./impermanence.nix

View file

@ -0,0 +1,27 @@
{ 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";
};
}