nix-stuff/roles/desktop/programs/keepassxc.nix

44 lines
1.2 KiB
Nix

{lib, ...}: let
kpxcSettings = lib.generators.toINI {} {
General = {
# Not sure what changing this does, I'll leave it alone
ConfigVersion = 2;
MinimizeAfterUnlock = true;
AutoSaveAfterEveryChange = false;
};
GUI = {
ApplicationTheme = "classic";
MinimizeOnStartup = false;
MinimizeOnClose = true;
MinimizeToTray = true;
ShowTrayIcon = true;
# 0 is icons, 1 is text, 2 is text next to icons, 3 is text under icons, and 4 is follow style
ToolButtonStyle = 0; # Would choose 4 but it's too big for a small window
# monochrome-light, monochrome-dark or colorful
TrayIconAppearance = "monochrome-light";
};
Security = {
HideNotes = true;
IconDownloadFallback = true;
};
SSHAgent.Enabled = true;
};
in {
home-manager = {
extraSpecialArgs = {kpxcSettings = kpxcSettings;};
users.toast = {
pkgs,
kpxcSettings,
...
}: {
# No module for KeePassXC config :(
home = {
packages = [pkgs.keepassxc];
file.".config/keepassxc/keepassxc.ini".text = kpxcSettings;
};
xdg.autostart.entries = [
"${pkgs.keepassxc}/share/applications/org.keepassxc.KeePassXC.desktop"
];
};
};
}