From 2e49d687d2c5db3509e9fccab74a52f89ee7c6cb Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Tue, 14 Nov 2023 11:28:47 +0800 Subject: [PATCH] home,nixpak: fix firefox launching issue --- users/guanranwang/home-manager/modules/browser/firefox.nix | 7 ++++++- .../guanranwang/home-manager/modules/browser/librewolf.nix | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/users/guanranwang/home-manager/modules/browser/firefox.nix b/users/guanranwang/home-manager/modules/browser/firefox.nix index 0fd2d48..14c6378 100644 --- a/users/guanranwang/home-manager/modules/browser/firefox.nix +++ b/users/guanranwang/home-manager/modules/browser/firefox.nix @@ -24,6 +24,11 @@ # Specified in https://github.com/schizofox/schizofox/blob/main/modules/hm/default.nix # I really don't have any idea what am I doing, it just works™ + dbus.policies = { + "org.mozilla.firefox.*" = "own"; + #"org.mozilla.firefox_beta.*" = "own"; + }; + bubblewrap = let envSuffix = envKey: sloth.concat' (sloth.env envKey); in { @@ -38,7 +43,7 @@ "/etc/localtime" "/sys/bus/pci" - ["${pkgs.firefox}/lib/firefox" "/app/etc/firefox"] + ["${config.app.package}/lib/firefox" "/app/etc/firefox"] (sloth.concat' sloth.xdgConfigHome "/dconf") # https://github.com/nixpak/pkgs/pull/22 diff --git a/users/guanranwang/home-manager/modules/browser/librewolf.nix b/users/guanranwang/home-manager/modules/browser/librewolf.nix index 1c5ee9a..86ce096 100644 --- a/users/guanranwang/home-manager/modules/browser/librewolf.nix +++ b/users/guanranwang/home-manager/modules/browser/librewolf.nix @@ -24,6 +24,10 @@ # Specified in https://github.com/schizofox/schizofox/blob/main/modules/hm/default.nix # I really don't have any idea what am I doing, it just works™ + dbus.policies = { + "io.gitlab.librewolf.*" = "own"; + }; + bubblewrap = let envSuffix = envKey: sloth.concat' (sloth.env envKey); in { @@ -38,7 +42,7 @@ "/etc/localtime" "/sys/bus/pci" - ["${pkgs.firefox}/lib/firefox" "/app/etc/firefox"] + ["${config.app.package}/lib/firefox" "/app/etc/firefox"] (sloth.concat' sloth.xdgConfigHome "/dconf") # https://github.com/nixpak/pkgs/pull/22