2.home-manager/tests/modules/programs/thunderbird/thunderbird-native-messaging-host.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

24 lines
982 B
Nix

# Confirm that both Firefox and Thunderbird can be configured at the same time.
{ lib, realPkgs, ... }:
lib.recursiveUpdate (import ./thunderbird.nix { inherit lib realPkgs; }) {
programs.thunderbird = {
nativeMessagingHosts = with realPkgs; [
# NOTE: this is not a real Thunderbird native host module but Firefox; no
# native hosts are currently packaged for nixpkgs or elsewhere, so we
# have to improvise. Packaging wise, Firefox and Thunderbird native hosts
# are identical though. The test doesn't care if the host was meant for
# either as long as the right paths are present in the package.
browserpass
];
};
nmt.script =
let
isDarwin = realPkgs.stdenv.hostPlatform.isDarwin;
nativeHostsDir =
if isDarwin then "Library/Mozilla/NativeMessagingHosts" else ".mozilla/native-messaging-hosts";
in
''
assertFileExists home-files/${nativeHostsDir}/com.github.browserpass.native.json
'';
}