From 7fcea8a37746a12d4d90378570e8966d4fca5765 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Sun, 30 Jul 2023 22:32:29 +0200 Subject: [PATCH] [Flatpak] workaround bad cursor theme in flatpak apps Also make flatpak-add-flathub a oneshot servicce --- desktop/flatpak.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/desktop/flatpak.nix b/desktop/flatpak.nix index f9369f3..1c0ec3f 100644 --- a/desktop/flatpak.nix +++ b/desktop/flatpak.nix @@ -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"; + }; } ; }