From 84df5f115caf4db536eae839ca5bcb57b31011a8 Mon Sep 17 00:00:00 2001 From: Soispha Peetz Date: Mon, 23 Nov 2026 16:03:12 +0100 Subject: modules/chipass: Switch to chipass from keepassxc It might be better? At least it only supports a light theme, but I guess that might change in the future (or when I figure out how to configure it correctly). --- modules/by-name/ch/chipass/keepassxc.ini | 68 ++++++++++++ modules/by-name/ch/chipass/module.nix | 129 +++++++++++++++++++++++ modules/by-name/ri/river/keymap.nix | 2 +- modules/common/soispha/default.nix | 1 + modules/home.legacy/conf/default.nix | 1 - modules/home.legacy/conf/keepassxc/default.nix | 12 --- modules/home.legacy/conf/keepassxc/keepassxc.ini | 68 ------------ modules/home.legacy/pkgs/default.nix | 14 --- 8 files changed, 199 insertions(+), 96 deletions(-) create mode 100644 modules/by-name/ch/chipass/keepassxc.ini create mode 100644 modules/by-name/ch/chipass/module.nix delete mode 100644 modules/home.legacy/conf/keepassxc/default.nix delete mode 100644 modules/home.legacy/conf/keepassxc/keepassxc.ini 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 +; 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 . + +[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 +# 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 . +{ + 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 + 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; + }; + }; +} diff --git a/modules/by-name/ri/river/keymap.nix b/modules/by-name/ri/river/keymap.nix index c51e5f06..a141d06d 100644 --- a/modules/by-name/ri/river/keymap.nix +++ b/modules/by-name/ri/river/keymap.nix @@ -46,7 +46,7 @@ in { "r" = { "a" = mkSpawn' pkgs.foot "footclient" "" {}; "b" = mkSpawn pkgs.tskm "open select" {once = true;}; - "k" = mkSpawn pkgs.keepassxc "" {once = true;}; + "k" = mkSpawn pkgs.chipass "" {once = true;}; "s" = mkSpawn pkgs.signal-desktop "" {once = true;}; "p" = mkSpawn pkgs.screenshot_persistent "" {once = true;}; "i" = mkSpawn pkgs.anki "" {once = true;}; diff --git a/modules/common/soispha/default.nix b/modules/common/soispha/default.nix index 640c6e2f..31eb951f 100644 --- a/modules/common/soispha/default.nix +++ b/modules/common/soispha/default.nix @@ -123,6 +123,7 @@ programs = { hledger.enable = true; + chipass.enable = true; starship.enable = true; rofi.enable = true; nixos-option.enable = true; diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix index cedcf71a..41c634dc 100644 --- a/modules/home.legacy/conf/default.nix +++ b/modules/home.legacy/conf/default.nix @@ -14,7 +14,6 @@ ./dconf ./gammastep ./himalaya - ./keepassxc ./mail ./mbsync ./mumble diff --git a/modules/home.legacy/conf/keepassxc/default.nix b/modules/home.legacy/conf/keepassxc/default.nix deleted file mode 100644 index 40f61ba0..00000000 --- a/modules/home.legacy/conf/keepassxc/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# 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 . -{...}: { - xdg.configFile."keepassxc/keepassxc.ini".source = ./keepassxc.ini; -} diff --git a/modules/home.legacy/conf/keepassxc/keepassxc.ini b/modules/home.legacy/conf/keepassxc/keepassxc.ini deleted file mode 100644 index 326f1d99..00000000 --- a/modules/home.legacy/conf/keepassxc/keepassxc.ini +++ /dev/null @@ -1,68 +0,0 @@ -; nixos-config - My current NixOS configuration -; -; Copyright (C) 2025 Benedikt Peetz -; 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 . - -[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/home.legacy/pkgs/default.nix b/modules/home.legacy/pkgs/default.nix index 840ffb19..04bd7896 100644 --- a/modules/home.legacy/pkgs/default.nix +++ b/modules/home.legacy/pkgs/default.nix @@ -15,12 +15,6 @@ }: # TODO: Remove this whole file, and move each package to a separate module. <2024-11-16> with pkgs; let - Gui = { - Misc = [ - keepassxc # password manager - ]; - }; - TuiCli = { Misc = [ bc # Smart calculator @@ -94,14 +88,6 @@ in { ++ (with builtins; concatLists (concatLists [ - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (concatMap mapFun - (attrValues Gui))))))) - (concatMap mapFun (concatMap mapFun (concatMap mapFun -- cgit v1.3.1