30 lines
897 B
Nix
30 lines
897 B
Nix
{ 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
|
|
(pkgs.gnome-themes-extra or gnome.gnome-themes-extra) # Until 24.11
|
|
];
|
|
pathsToLink = [ "/share/icons" ];
|
|
};
|
|
aggregatedFonts = pkgs.buildEnv {
|
|
name = "system-fonts";
|
|
paths = config.fonts.packages;
|
|
pathsToLink = [ "/share/fonts" ];
|
|
};
|
|
in
|
|
{
|
|
"/usr/share/icons" = mkRoSymBind "${aggregatedIcons}/share/icons";
|
|
"/usr/local/share/fonts" = mkRoSymBind "${aggregatedFonts}/share/fonts";
|
|
};
|
|
}
|