mirror of
https://github.com/nix-community/home-manager
synced 2024-11-24 03:59:46 +01:00
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
{
|
||
|
config = {
|
||
|
programs.browserpass = {
|
||
|
enable = true;
|
||
|
browsers = [
|
||
|
"chrome"
|
||
|
"chromium"
|
||
|
"firefox"
|
||
|
"vivaldi"
|
||
|
];
|
||
|
};
|
||
|
|
||
|
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
|
||
|
|
||
|
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
|
||
|
|
||
|
assertFileExists "home-files/.mozilla/native-messaging-hosts/com.github.browserpass.native.json"
|
||
|
'';
|
||
|
};
|
||
|
}
|