2020-10-12 00:22:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.browserpass = {
|
|
|
|
enable = true;
|
2024-01-05 11:06:15 +00:00
|
|
|
browsers =
|
|
|
|
[ "brave" "chrome" "chromium" "firefox" "librewolf" "vivaldi" ];
|
2020-10-12 00:22:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nmt.script = if pkgs.stdenv.hostPlatform.isDarwin then ''
|
2024-01-05 11:06:15 +00:00
|
|
|
for dir in "BraveSoftware/Brave-Browser" "Google/Chrome" "Chromium" "Mozilla" "LibreWolf" "Vivaldi"; do
|
2020-10-12 00:22:58 +00:00
|
|
|
assertFileExists "home-files/Library/Application Support/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
|
|
|
|
done
|
|
|
|
|
|
|
|
for dir in "Google/Chrome" "Chromium" "Vivaldi"; do
|
|
|
|
assertFileExists "home-files/Library/Application Support/$dir/policies/managed/com.github.browserpass.native.json"
|
|
|
|
done
|
|
|
|
'' else ''
|
2023-01-10 09:35:00 +00:00
|
|
|
for dir in "BraveSoftware/Brave-Browser" "google-chrome" "chromium" "vivaldi"; do
|
2020-10-12 00:22:58 +00:00
|
|
|
assertFileExists "home-files/.config/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
|
2023-01-10 09:35:00 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
for dir in "google-chrome" "chromium" "vivaldi"; do
|
2020-10-12 00:22:58 +00:00
|
|
|
assertFileExists "home-files/.config/$dir/policies/managed/com.github.browserpass.native.json"
|
|
|
|
done
|
|
|
|
|
2024-01-05 11:06:15 +00:00
|
|
|
for dir in ".mozilla" ".librewolf"; do
|
|
|
|
assertFileExists "home-files/$dir/native-messaging-hosts/com.github.browserpass.native.json"
|
|
|
|
done
|
2020-10-12 00:22:58 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|