Desktop/keepassxc: move to new module

This commit is contained in:
Toast 2025-04-27 02:32:00 +02:00
parent 85c3c570dd
commit 6e5a9ca208

View file

@ -1,40 +1,32 @@
{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 {
{pkgs, ...}: {
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;
programs.keepassxc = {
enable = true;
settings = {
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;
};
};
xdg.autostart.entries = [
"${pkgs.keepassxc}/share/applications/org.keepassxc.KeePassXC.desktop"