home-manager/tests/modules/programs/browserpass/browserpass.nix

30 lines
1 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.browserpass = {
enable = true;
2020-02-01 23:39:17 +00:00
browsers = [ "chrome" "chromium" "firefox" "vivaldi" ];
};
2020-02-01 23:39:17 +00:00
nmt.script = if pkgs.stdenv.hostPlatform.isDarwin then ''
for dir in "Google/Chrome" "Chromium" "Mozilla" "Vivaldi"; do
assertFileExists "home-files/Library/Application Support/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
done
2020-02-01 23:39:17 +00:00
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 "google-chrome" "chromium" "vivaldi"; do
assertFileExists "home-files/.config/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
assertFileExists "home-files/.config/$dir/policies/managed/com.github.browserpass.native.json"
done
2020-02-01 23:39:17 +00:00
assertFileExists "home-files/.mozilla/native-messaging-hosts/com.github.browserpass.native.json"
'';
};
}