keepassxc: added settings option and moved current settings to home/aly

This commit is contained in:
Aly Raffauf 2024-06-17 16:31:54 -04:00
parent 5deb652a5d
commit ea8388f1d1
3 changed files with 56 additions and 46 deletions

View file

@ -5,48 +5,10 @@
...
}: {
config = lib.mkIf config.alyraffauf.apps.keepassxc.enable {
home = {
file.".cache/keepassxc/keepassxc.ini".text = lib.generators.toINI {} {
General.LastActiveDatabase = "/${config.home.homeDirectory}/sync/Passwords.kdbx";
};
packages = [pkgs.keepassxc];
};
home.packages = [pkgs.keepassxc];
xdg.configFile."keepassxc/keepassxc.ini".text = lib.generators.toINI {} {
Browser = {
AlwaysAllowAccess = true;
Enabled = true;
SearchInAllDatabases = true;
};
General = {
ConfigVersion = 2;
HideWindowOnCopy = true;
MinimizeAfterUnlock = false;
MinimizeOnOpenUrl = true;
};
GUI = {
ApplicationTheme = "classic";
ColorPasswords = false;
CompactMode = true;
MinimizeOnClose = true;
MinimizeOnStartup = false;
MinimizeToTray = true;
ShowTrayIcon = true;
TrayIconAppearance = "colorful";
};
Security = {
ClearClipboardTimeout = 15;
EnableCopyOnDoubleClick = true;
IconDownloadFallback = true;
LockDatabaseScreenLock = false;
};
SSHAgent = {
Enabled = true;
};
};
xdg.configFile."keepassxc/keepassxc.ini".text =
lib.generators.toINI {}
config.alyraffauf.apps.keepassxc.settings;
};
}

View file

@ -23,7 +23,14 @@
firefox.enable = lib.mkEnableOption "Firefox web browser.";
fuzzel.enable = lib.mkEnableOption "Fuzzel app launcher.";
fzf.enable = lib.mkEnableOption "Fzf fuzzy file finder.";
keepassxc.enable = lib.mkEnableOption "KeePassXC password manager.";
keepassxc = {
enable = lib.mkEnableOption "KeePassXC password manager.";
settings = lib.mkOption {
description = "KeePassXC settings.";
default = {};
type = lib.types.attrs;
};
};
librewolf.enable = lib.mkEnableOption "Librewolf web browser.";
mako.enable = lib.mkEnableOption "Mako notification daemon.";
neofetch.enable = lib.mkEnableOption "Neofetch.";

View file

@ -7,9 +7,10 @@
...
}: {
home = {
username = "aly";
homeDirectory = "/home/aly";
stateVersion = "24.05";
file.".cache/keepassxc/keepassxc.ini".text = lib.generators.toINI {} {
General.LastActiveDatabase = "${config.home.homeDirectory}/sync/Passwords.kdbx";
};
packages = with pkgs; [
browsh
curl
@ -27,6 +28,8 @@
webcord
wget
];
stateVersion = "24.05";
username = "aly";
};
programs = {
@ -100,7 +103,45 @@
fastfetch.enable = true;
firefox.enable = true;
fzf.enable = true;
keepassxc.enable = true;
keepassxc = {
enable = true;
settings = {
Browser = {
AlwaysAllowAccess = true;
Enabled = true;
SearchInAllDatabases = true;
};
General = {
ConfigVersion = 2;
HideWindowOnCopy = true;
MinimizeAfterUnlock = false;
MinimizeOnOpenUrl = true;
};
GUI = {
ApplicationTheme = "classic";
ColorPasswords = false;
CompactMode = true;
MinimizeOnClose = true;
MinimizeOnStartup = false;
MinimizeToTray = true;
ShowTrayIcon = true;
TrayIconAppearance = "colorful";
};
Security = {
ClearClipboardTimeout = 15;
EnableCopyOnDoubleClick = true;
IconDownloadFallback = true;
LockDatabaseScreenLock = false;
};
SSHAgent = {
Enabled = true;
};
};
};
neofetch.enable = true;
neovim.enable = true;
tmux.enable = true;