KeePassXC fully integrated: passwords, browser integration, ssh, & service

This commit is contained in:
Semere Meharena Mebrahtom 2026-07-26 23:56:35 +02:00
parent a8bc48adc0
commit d74cd9b87c
No known key found for this signature in database
7 changed files with 71 additions and 8 deletions

53
modules/keepassxc.nix Normal file
View file

@ -0,0 +1,53 @@
{
config,
lib,
pkgs,
userVars,
...
}:
{
# Install KeePassXC globally.
environment.systemPackages = with pkgs; [
keepassxc
];
# Disable GNOME Keyring to prevent it from conflicting with KeePassXC's Secret Service Integration.
services.gnome.gnome-keyring.enable = false;
# Enable the standard system-level SSH agent.
programs.ssh.startAgent = true;
home-manager.users."${userVars.username}" = {
# Disable GNOME Keyring in Home Manager as well.
services.gnome-keyring.enable = false;
# Disable automatic keys addition to standard SSH agent using the modern settings option.
programs.ssh = {
enable = true;
enableDefaultConfig = false;
settings = {
"*" = {
AddKeysToAgent = "no";
};
};
};
# Configure KeePassXC native messaging hosts for Firefox and Zen Browser.
# This enables the browser extension to communicate with KeePassXC.
home.file = {
# ".mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json".text = builtins.toJSON {
# allowed_extensions = [ "keepassxc-browser@keepassxc.org" ];
# description = "KeePassXC integration with Mozilla Firefox";
# name = "org.keepassxc.keepassxc_browser";
# path = "${pkgs.keepassxc}/bin/keepassxc-proxy";
# type = "stdio";
# };
# ".config/zen/native-messaging-hosts/org.keepassxc.keepassxc_browser.json".text = builtins.toJSON {
# allowed_extensions = [ "keepassxc-browser@keepassxc.org" ];
# description = "KeePassXC integration with Zen Browser";
# name = "org.keepassxc.keepassxc_browser";
# path = "${pkgs.keepassxc}/bin/keepassxc-proxy";
# type = "stdio";
# };
};
};
}