1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-06 00:51:04 +01:00

keepassxc: register as native messaging host (#6879)

Register KeepassXC as a native messaging host in supported browsers to integrate with KeepassXC's browser extension.  See https://discourse.nixos.org/t/keepassxc-browser-extension-integration/39553 for more information.
This commit is contained in:
Benedikt M. Rips 2025-04-22 18:42:04 +02:00 committed by GitHub
parent b925865c74
commit c9433ae62f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,12 +45,26 @@ in
};
};
config = lib.mkIf cfg.enable {
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile = {
"keepassxc/keepassxc.ini" = lib.mkIf (cfg.settings != { }) {
source = iniFormat.generate "keepassxc-settings" cfg.settings;
};
};
};
config = lib.mkIf cfg.enable (
lib.mkMerge [
{
xdg.configFile = {
"keepassxc/keepassxc.ini" = lib.mkIf (cfg.settings != { }) {
source = iniFormat.generate "keepassxc-settings" cfg.settings;
};
};
}
(lib.mkIf (cfg.package != null) {
home.packages = [ cfg.package ];
programs.brave.nativeMessagingHosts = [ cfg.package ];
programs.chromium.nativeMessagingHosts = [ cfg.package ];
programs.firefox.nativeMessagingHosts = [ cfg.package ];
programs.floorp.nativeMessagingHosts = [ cfg.package ];
programs.vivaldi.nativeMessagingHosts = [ cfg.package ];
})
]
);
}