summaryrefslogtreecommitdiffstats
path: root/modules/by-name/ch
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/ch')
-rw-r--r--modules/by-name/ch/chipass/keepassxc.ini68
-rw-r--r--modules/by-name/ch/chipass/module.nix129
2 files changed, 197 insertions, 0 deletions
diff --git a/modules/by-name/ch/chipass/keepassxc.ini b/modules/by-name/ch/chipass/keepassxc.ini
new file mode 100644
index 00000000..326f1d99
--- /dev/null
+++ b/modules/by-name/ch/chipass/keepassxc.ini
@@ -0,0 +1,68 @@
+; nixos-config - My current NixOS configuration
+;
+; Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+; SPDX-License-Identifier: GPL-3.0-or-later
+;
+; This file is part of my nixos-config.
+;
+; You should have received a copy of the License along with this program.
+; If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
+[General]
+AutoSaveAfterEveryChange=true
+BackupBeforeSave=true
+BackupFilePathPattern=/home/soispha/.local/share/keepassxc/{DB_FILENAME}.old.kdbx
+ConfigVersion=2
+HideWindowOnCopy=false
+
+[Browser]
+CustomProxyLocation=
+Enabled=true
+
+[FdoSecrets]
+Enabled=true
+
+[GUI]
+AdvancedSettings=true
+ApplicationTheme=dark
+CompactMode=false
+HidePasswords=true
+ShowExpiredEntriesOnDatabaseUnlockOffsetDays=1
+TrayIconAppearance=monochrome-light
+
+[KeeShare]
+Active=""
+Own=""
+QuietSuccess=true
+
+[PasswordGenerator]
+AdditionalChars=
+AdvancedMode=true
+Braces=true
+Dashes=true
+EASCII=true
+ExcludedChars=
+Length=128
+Logograms=true
+LowerCase=true
+Math=true
+Numbers=true
+Punctuation=true
+Quotes=true
+SpecialChars=true
+Type=0
+UpperCase=true
+WordCount=4
+WordSeparator=","
+
+[SSHAgent]
+Enabled=true
+
+[Security]
+HidePasswordPreviewPanel=true
+IconDownloadFallback=true
+LockDatabaseIdle=false
+LockDatabaseIdleSeconds=960
+PasswordEmptyPlaceholder=true
+PasswordsHidden=true
+PasswordsRepeatVisible=true
diff --git a/modules/by-name/ch/chipass/module.nix b/modules/by-name/ch/chipass/module.nix
new file mode 100644
index 00000000..1b343387
--- /dev/null
+++ b/modules/by-name/ch/chipass/module.nix
@@ -0,0 +1,129 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: let
+ cfg = config.soispha.programs.chipass;
+
+ iniFormat = pkgs.formats.ini {};
+ settingsFile = iniFormat.generate "chipass-settings" cfg.settings;
+in {
+ options.soispha.programs.chipass = {
+ enable = lib.mkEnableOption "chipass";
+
+ settings = lib.mkOption {
+ inherit (iniFormat) type;
+ default = {};
+ example = {
+ Browser.Enabled = true;
+
+ GUI = {
+ AdvancedSettings = true;
+ ApplicationTheme = "dark";
+ CompactMode = true;
+ HidePasswords = true;
+ };
+
+ SSHAgent.Enabled = true;
+ };
+ description = ''
+ Configuration written to
+ {file}`$XDG_CONFIG_HOME/keepassxc/keepassxc.ini`.
+
+ See <https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Config.cpp>
+ for the full list of options.
+
+ ::: {.note}
+ When the settings are non-empty, the configuration file will be linked
+ into the Nix store and KeePassXC will report an access error for its
+ configuration file. This is expected and can not be fixed in a way that
+ aligns with Home Manager's principles. See [#8257](https://github.com/nix-community/home-manager/issues/8257) for more details.
+ :::
+ '';
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ soispha.programs.chipass.settings = lib.mkDefault {
+ General = {
+ BackupBeforeSave = true;
+ AutoSaveAfterEveryChange = true;
+ BackupFilePathPattern = "${config.home-manager.users.soispha.xdg.dataHome}/chipass/{DB_FILENAME}.old.kdbx";
+ ConfigVersion = 2;
+ };
+
+ Browser = {
+ Enabled = false;
+ CustomProxyLocation = "";
+ };
+
+ FdoSecrets = {
+ Enabled = false;
+ };
+
+ GUI = {
+ ColorPasswords = false;
+ CompactMode = false;
+ TrayIconAppearance = "monochrome-light";
+ AdvancedSettings = true;
+ HidePasswords = true;
+ };
+
+ KeeShare = {
+ Active = "";
+ Own = "";
+ QuietSuccess = true;
+ };
+
+ PasswordGenerator = {
+ AdditionalChars = "";
+ ExcludedChars = "";
+ WordList = ":/wordlists/eff_large.wordlist";
+ AdvancedMode = true;
+ Braces = true;
+ Dashes = true;
+ EASCII = true;
+ Length = 128;
+ Logograms = true;
+ LowerCase = true;
+ Math = true;
+ Numbers = true;
+ Punctuation = true;
+ Quotes = true;
+ SpecialChars = true;
+ Type = 0;
+ UpperCase = true;
+ WordCount = 4;
+ WordSeparator = ",";
+ };
+
+ SSHAgent = {
+ Enabled = false;
+ };
+
+ Security = {
+ HidePasswordPreviewPanel = true;
+ IconDownloadFallback = true;
+ LockDatabaseIdle = false;
+ LockDatabaseIdleSeconds = 960;
+ PasswordEmptyPlaceholder = true;
+ PasswordsHidden = true;
+ PasswordsRepeatVisible = true;
+ };
+ };
+
+ home-manager.users.soispha = {
+ xdg.configFile."keepassxc/keepassxc.ini".source = settingsFile;
+ };
+ };
+}