2022-12-05 18:00:03 +02:00
|
|
|
{ config, lib, pkgs, sloth, ... }:
|
2022-07-07 21:16:12 +03:00
|
|
|
|
2023-01-07 20:04:59 +02:00
|
|
|
let
|
|
|
|
envSuffix = envKey: suffix: sloth.concat' (sloth.env envKey) suffix;
|
|
|
|
in
|
|
|
|
|
2022-07-07 21:16:12 +03:00
|
|
|
{
|
|
|
|
config = {
|
|
|
|
dbus.policies = {
|
|
|
|
"${config.flatpak.appId}" = "own";
|
|
|
|
"org.freedesktop.DBus" = "talk";
|
|
|
|
"org.gtk.vfs.*" = "talk";
|
|
|
|
"org.gtk.vfs" = "talk";
|
|
|
|
"ca.desrt.dconf" = "talk";
|
|
|
|
"org.freedesktop.portal.*" = "talk";
|
|
|
|
"org.a11y.Bus" = "talk";
|
|
|
|
};
|
2022-07-07 21:42:36 +03:00
|
|
|
gpu.enable = lib.mkDefault true;
|
2022-07-31 16:11:14 +03:00
|
|
|
gpu.provider = "bundle";
|
2022-12-05 17:55:13 +02:00
|
|
|
fonts.enable = true;
|
2022-12-05 17:53:32 +02:00
|
|
|
locale.enable = true;
|
2022-07-07 21:16:12 +03:00
|
|
|
bubblewrap = {
|
2022-07-07 21:42:36 +03:00
|
|
|
network = lib.mkDefault false;
|
2022-07-07 21:16:12 +03:00
|
|
|
bind.rw = [
|
2023-01-07 20:04:59 +02:00
|
|
|
(sloth.concat' sloth.xdgCacheHome "/fontconfig")
|
|
|
|
(sloth.concat' sloth.xdgCacheHome "/mesa_shader_cache")
|
|
|
|
|
2022-12-05 18:00:03 +02:00
|
|
|
(sloth.concat [
|
|
|
|
(sloth.env "XDG_RUNTIME_DIR")
|
|
|
|
"/"
|
|
|
|
(sloth.env "WAYLAND_DISPLAY")
|
|
|
|
])
|
2023-01-07 20:04:59 +02:00
|
|
|
|
|
|
|
(envSuffix "XDG_RUNTIME_DIR" "/at-spi/bus")
|
|
|
|
(envSuffix "XDG_RUNTIME_DIR" "/gvfsd")
|
|
|
|
(envSuffix "XDG_RUNTIME_DIR" "/pulse")
|
2023-01-19 19:01:04 +02:00
|
|
|
(envSuffix "XDG_RUNTIME_DIR" "/doc")
|
2022-07-07 21:16:12 +03:00
|
|
|
];
|
|
|
|
bind.ro = [
|
2022-12-05 18:00:03 +02:00
|
|
|
(sloth.concat' sloth.xdgConfigHome "/gtk-2.0")
|
|
|
|
(sloth.concat' sloth.xdgConfigHome "/gtk-3.0")
|
|
|
|
(sloth.concat' sloth.xdgConfigHome "/gtk-4.0")
|
2022-07-07 21:16:12 +03:00
|
|
|
];
|
|
|
|
env = {
|
|
|
|
XDG_DATA_DIRS = lib.makeSearchPath "share" [
|
|
|
|
pkgs.gnome.adwaita-icon-theme
|
|
|
|
pkgs.shared-mime-info
|
|
|
|
];
|
2022-07-31 16:11:14 +03:00
|
|
|
XCURSOR_PATH = lib.concatStringsSep ":" [
|
|
|
|
"${pkgs.gnome.adwaita-icon-theme}/share/icons"
|
|
|
|
"${pkgs.gnome.adwaita-icon-theme}/share/pixmaps"
|
|
|
|
];
|
2022-07-07 21:16:12 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|