mirror of
https://github.com/nix-community/home-manager
synced 2024-11-22 20:53:14 +00:00
browserpass: support librewolf
This commit is contained in:
parent
da6874e8bb
commit
18791781ea
2 changed files with 18 additions and 4 deletions
|
@ -4,7 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.programs.browserpass;
|
||||
browsers = [ "brave" "chrome" "chromium" "firefox" "vivaldi" ];
|
||||
browsers = [ "brave" "chrome" "chromium" "firefox" "librewolf" "vivaldi" ];
|
||||
in {
|
||||
options = {
|
||||
programs.browserpass = {
|
||||
|
@ -72,6 +72,17 @@ in {
|
|||
"${dir}/com.github.browserpass.native.json".source =
|
||||
"${pkgs.browserpass}/lib/browserpass/hosts/firefox/com.github.browserpass.native.json";
|
||||
}]
|
||||
else if x == "librewolf" then
|
||||
let
|
||||
dir = if isDarwin then
|
||||
"Library/Application Support/LibreWolf/NativeMessagingHosts"
|
||||
else
|
||||
".librewolf/native-messaging-hosts";
|
||||
in [{
|
||||
"${dir}/com.github.browserpass.native.json".source =
|
||||
"${pkgs.browserpass}/lib/browserpass/hosts/firefox/com.github.browserpass.native.json";
|
||||
}]
|
||||
|
||||
else if x == "vivaldi" then
|
||||
let
|
||||
dir = if isDarwin then
|
||||
|
|
|
@ -6,11 +6,12 @@ with lib;
|
|||
config = {
|
||||
programs.browserpass = {
|
||||
enable = true;
|
||||
browsers = [ "brave" "chrome" "chromium" "firefox" "vivaldi" ];
|
||||
browsers =
|
||||
[ "brave" "chrome" "chromium" "firefox" "librewolf" "vivaldi" ];
|
||||
};
|
||||
|
||||
nmt.script = if pkgs.stdenv.hostPlatform.isDarwin then ''
|
||||
for dir in "BraveSoftware/Brave-Browser" "Google/Chrome" "Chromium" "Mozilla" "Vivaldi"; do
|
||||
for dir in "BraveSoftware/Brave-Browser" "Google/Chrome" "Chromium" "Mozilla" "LibreWolf" "Vivaldi"; do
|
||||
assertFileExists "home-files/Library/Application Support/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
|
||||
done
|
||||
|
||||
|
@ -26,7 +27,9 @@ with lib;
|
|||
assertFileExists "home-files/.config/$dir/policies/managed/com.github.browserpass.native.json"
|
||||
done
|
||||
|
||||
assertFileExists "home-files/.mozilla/native-messaging-hosts/com.github.browserpass.native.json"
|
||||
for dir in ".mozilla" ".librewolf"; do
|
||||
assertFileExists "home-files/$dir/native-messaging-hosts/com.github.browserpass.native.json"
|
||||
done
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue