2019-05-31 20:12:46 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.browserpass = {
|
|
|
|
enable = true;
|
2023-08-02 02:24:11 +02:00
|
|
|
browsers =
|
|
|
|
[ "brave" "chrome" "chromium" "firefox" "librewolf" "vivaldi" ];
|
2019-05-31 20:12:46 +02:00
|
|
|
};
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
nmt.script = if pkgs.stdenv.hostPlatform.isDarwin then ''
|
2023-08-02 02:24:11 +02:00
|
|
|
for dir in "BraveSoftware/Brave-Browser" "Google/Chrome" "Chromium" "Mozilla" "LibreWolf" "Vivaldi"; do
|
2020-02-02 00:39:17 +01:00
|
|
|
assertFileExists "home-files/Library/Application Support/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
|
|
|
|
done
|
2019-05-31 20:12:46 +02:00
|
|
|
|
2020-02-02 00:39:17 +01: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 ''
|
2022-03-24 18:35:47 +01:00
|
|
|
for dir in "BraveSoftware/Brave-Browser" "google-chrome" "chromium" "vivaldi"; do
|
2020-02-02 00:39:17 +01:00
|
|
|
assertFileExists "home-files/.config/$dir/NativeMessagingHosts/com.github.browserpass.native.json"
|
2022-03-24 18:35:47 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
for dir in "google-chrome" "chromium" "vivaldi"; do
|
2020-02-02 00:39:17 +01:00
|
|
|
assertFileExists "home-files/.config/$dir/policies/managed/com.github.browserpass.native.json"
|
|
|
|
done
|
2019-05-31 20:12:46 +02:00
|
|
|
|
2023-08-02 02:24:11 +02:00
|
|
|
for dir in ".mozilla" ".librewolf"; do
|
|
|
|
assertFileExists "home-files/$dir/native-messaging-hosts/com.github.browserpass.native.json"
|
|
|
|
done
|
2020-02-02 00:39:17 +01:00
|
|
|
'';
|
2019-05-31 20:12:46 +02:00
|
|
|
};
|
|
|
|
}
|