mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 17:11:03 +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:
parent
b925865c74
commit
c9433ae62f
1 changed files with 22 additions and 8 deletions
|
|
@ -45,12 +45,26 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable (
|
||||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
lib.mkMerge [
|
||||||
|
|
||||||
|
{
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"keepassxc/keepassxc.ini" = lib.mkIf (cfg.settings != { }) {
|
"keepassxc/keepassxc.ini" = lib.mkIf (cfg.settings != { }) {
|
||||||
source = iniFormat.generate "keepassxc-settings" 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 ];
|
||||||
|
})
|
||||||
|
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue