Mount font folders to make flatpaks not cry

This commit is contained in:
Natsu Kagami 2023-11-06 13:09:12 +01:00
parent 1f10e0e943
commit 7d71caa8db
Signed by: nki
GPG key ID: 55A032EB38B49ADB
3 changed files with 31 additions and 1 deletions

View file

@ -51,7 +51,7 @@ in
# Note taking
(if pkgs.stdenv.isAarch64 then
pkgs.hello
else logseq.override { electron = pkgs.electron_24; /* old electron versions have trouble with touchscreens */ })
else logseq)
# (if stdenv.isAarch64 then zotero else pkgs.unstable.zotero) // kinda fucked for now from CVE
libreoffice

View file

@ -20,6 +20,7 @@ let
};
in
{
imports = [ ./mounting.nix ];
# Fonts
config.fonts = {
fonts = with pkgs; [

View file

@ -0,0 +1,29 @@
{ 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";
paths = config.fonts.fonts;
pathsToLink = [ "/share/fonts" ];
};
in
{
"/usr/share/icons" = mkRoSymBind "${aggregatedIcons}/share/icons";
"/usr/local/share/fonts" = mkRoSymBind "${aggregatedFonts}/share/fonts";
};
}