nixcfg/flatpak/default.nix

40 lines
1,012 B
Nix
Raw Normal View History

2024-02-29 17:06:55 -05:00
{ config, pkgs, ... }:
{
xdg.portal.enable = true;
services.flatpak.enable = true;
services.flatpak.packages = [
"org.mozilla.firefox"
];
services.flatpak.overrides = {
sockets = [
"gpg-agent" # Expose GPG agent
"pcsc" # Expose smart cards (i.e. YubiKey)
];
};
"org.onlyoffice.desktopeditors".Context.sockets = ["x11"]; # No Wayland support
};
2024-03-01 09:52:19 -05:00
fonts.fontDir.enable = true;
2024-02-29 17:06:55 -05:00
system.fsPackages = [ pkgs.bindfs ];
fileSystems = let
mkRoSymBind = path: {
device = path;
fsType = "fuse.bindfs";
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
};
aggregatedFonts = pkgs.buildEnv {
name = "system-fonts";
2024-03-01 19:42:48 -05:00
paths = config.fonts.packages;
2024-02-29 17:06:55 -05:00
pathsToLink = [ "/share/fonts" ];
};
in {
# Create an FHS mount to support flatpak host icons/fonts
"/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons");
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
};
}