2023-11-06 12:09:12 +00:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
lib.mkIf pkgs.stdenv.isLinux {
|
|
|
|
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; [
|
|
|
|
#libsForQt5.breeze-qt5 # for plasma
|
|
|
|
gnome.gnome-themes-extra
|
|
|
|
];
|
|
|
|
pathsToLink = [ "/share/icons" ];
|
|
|
|
};
|
|
|
|
aggregatedFonts = pkgs.buildEnv {
|
|
|
|
name = "system-fonts";
|
2023-12-01 21:05:54 +00:00
|
|
|
paths = config.fonts.packages;
|
2023-11-06 12:09:12 +00:00
|
|
|
pathsToLink = [ "/share/fonts" ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
"/usr/share/icons" = mkRoSymBind "${aggregatedIcons}/share/icons";
|
|
|
|
"/usr/local/share/fonts" = mkRoSymBind "${aggregatedFonts}/share/fonts";
|
|
|
|
};
|
|
|
|
}
|