[Flatpak] workaround bad cursor theme in flatpak apps

Also make flatpak-add-flathub a oneshot servicce
This commit is contained in:
Antoine Viallon 2023-07-30 22:32:29 +02:00
parent 50ed99e303
commit 7fcea8a377
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -9,6 +9,7 @@ in {
script = ''
exec ${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
'';
serviceConfig.Type = "oneshot";
requires = [
"network-online.target"
];
@ -20,6 +21,26 @@ in {
];
};
systemd.services.flatpak-workaround-cursors = {
script = ''
exec ${pkgs.flatpak}/bin/flatpak override --filesystem=/usr/share/icons/:ro
'';
serviceConfig.Type = "oneshot";
wantedBy = [
"graphical.target"
];
};
system.fsPackages = [ pkgs.bindfs ];
fileSystems =
let mkRoSymBind = path: {
device = path;
fsType = "fuse.bindfs";
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
};
in {
"/usr/share/icons" = mkRoSymBind "/run/current-system/sw/share/icons";
};
}
;
}