depot/third_party/home-manager/tests/modules/programs/browserpass/browserpass.nix
Default email 2eafb8192e Project import generated by Copybara.
GitOrigin-RevId: 176e455371a8371586e8a3ff0d56ee9f3ca2324e
2023-01-10 02:35:00 -07:00

32 lines
1.2 KiB
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.browserpass = {
enable = true;
browsers = [ "brave" "chrome" "chromium" "firefox" "vivaldi" ];
};
nmt.script = if pkgs.stdenv.hostPlatform.isDarwin then ''
for dir in "BraveSoftware/Brave-Browser" "Google/Chrome" "Chromium" "Mozilla" "Vivaldi"; do
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 ''
for dir in "BraveSoftware/Brave-Browser" "google-chrome" "chromium" "vivaldi"; do
assertFileExists "home-files/.config/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
done
for dir in "google-chrome" "chromium" "vivaldi"; do
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"
'';
};
}