mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-26 18:31:54 -05:00
33 lines
882 B
Nix
33 lines
882 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
config = lib.mkIf config.alyraffauf.services.flatpak.enable {
|
|
environment.systemPackages = with pkgs; [gnome.gnome-software];
|
|
|
|
fileSystems = let
|
|
mkRoSymBind = path: {
|
|
device = path;
|
|
fsType = "fuse.bindfs";
|
|
options = ["ro" "resolve-symlinks" "x-gvfs-hide"];
|
|
};
|
|
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 (config.system.path + "/share/icons");
|
|
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
|
|
};
|
|
|
|
fonts.fontDir.enable = true;
|
|
services.flatpak.enable = true;
|
|
system.fsPackages = [pkgs.bindfs];
|
|
xdg.portal.enable = true;
|
|
};
|
|
}
|