{ config, pkgs, lib, ... }: let kpxcSettings = lib.generators.toINI {} { # Not sure what changing this does, I'll leave it alone General = { ConfigVersion = 2; MinimizeAfterUnlock = true; }; 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"; }; SSHAgent.Enabled = true; }; in { # I'm only using keepass on my user, so I'm installing it with home-manager home-manager = { /* TODO: move home-manager settings into the common role They are not keepass specific, so they really should not be here. I'm too lazy to do it now tho :P */ backupFileExtension = "backup"; useGlobalPkgs = true; extraSpecialArgs = { kpxcSettings = kpxcSettings; }; users.toast = { config, pkgs, kpxcSettings, ... }: { home = { stateVersion = "23.05"; packages = [ pkgs.keepassxc ]; # No module for KeePassXC config :( file = { ".config/keepassxc/keepassxc.ini".text = kpxcSettings; # For some reason the autostart .desktop is not the same as the regular one ".config/autostart/org.keepassxc.KeePassXC.desktop".text = '' [Desktop Entry] Name=KeePassXC GenericName=Password Manager Exec=keepassxc TryExec=keepassxc Icon=keepassxc StartupWMClass=keepassxc StartupNotify=true Terminal=false Type=Application Version=1.0 Categories=Utility;Security;Qt; MimeType=application/x-keepass2; X-GNOME-Autostart-enabled=true X-GNOME-Autostart-Delay=2 X-KDE-autostart-after=panel X-LXQt-Need-Tray=true ''; }; }; }; }; }