chore: cleanup all files

This commit is contained in:
DashieTM 2025-05-11 13:57:38 +02:00
parent f4e47cbf97
commit 9cc9955425
43 changed files with 2893 additions and 2834 deletions

View file

@ -12,54 +12,63 @@
type = lib.types.bool;
description = "Enables the piper program and its daemon";
};
use_cache_config = lib.mkOption {
useConfig = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
description = "Whether to overwrite the config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
};
cache_config = lib.mkOption {
config = lib.mkOption {
default = ''
[General]
LastDatabases=/home/${config.conf.username}/pws/Passwords.kdbx
LastActiveDatabase=/home/${config.conf.username}/pws/Passwords.kdbx
LastOpenedDatabases=/home/${config.conf.username}/pws/Passwords.kdbx
LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0p\0w\0s\0/\0P\0\x61\0s\0s\0w\0o\0r\0\x64\0s\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0p\0w\0s\0/\0l\0o\0g\0i\0n\0_\0k\0\x65\0y\0.\0k\0\x65\0y\0x)
ConfigVersion=2
[Browser]
Enabled=true
[GUI]
ApplicationTheme=classic
HidePasswords=true
MinimizeOnClose=true
MinimizeToTray=true
ShowTrayIcon=true
TrayIconAppearance=monochrome-light
[PasswordGenerator]
Length=30
[Security]
EnableCopyOnDoubleClick=true
'';
example = "";
type = lib.types.lines;
description = "Cache config to be used.";
};
useCacheConfig = lib.mkOption {
default = false;
example = true;
type = lib.types.bool;
description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
};
cacheConfig = lib.mkOption {
default = '''';
example = ''
[General]
LastDatabases=/path/to/database
'';
type = lib.types.lines;
description = "Cache config to be used.";
};
};
config = lib.mkIf config.mods.keepassxc.enable (
lib.optionalAttrs (options ? home.file) {
home.packages = [pkgs.keepassxc];
xdg.configFile."keepassxc/keepassxc.ini" = {
text = ''
[General]
ConfigVersion=2
[Browser]
Enabled=true
[GUI]
ApplicationTheme=classic
HidePasswords=true
MinimizeOnClose=true
MinimizeToTray=true
ShowTrayIcon=true
TrayIconAppearance=monochrome-light
[PasswordGenerator]
Length=30
[Security]
EnableCopyOnDoubleClick=true
'';
xdg.configFile."keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.useConfig {
text = config.mods.keepassxc.config;
};
home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.use_cache_config {
text = config.mods.keepassxc.cache_config;
home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.useCacheConfig {
text = config.mods.keepassxc.cacheConfig;
};
}
);