mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
keepassxc
This commit is contained in:
1 parent
4e6787d4b4
commit
776b7c3f87
4 files changed
+86
No files matched your search
@@ -0,0 +1,27 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.homeModules.home-keepassxc-mutable-config =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.keepassxc;
|
||||
ini = "${config.xdg.configHome}/keepassxc/keepassxc.ini";
|
||||
declared = (pkgs.formats.ini { }).generate "keepassxc-declared.ini" cfg.settings;
|
||||
in
|
||||
{
|
||||
xdg.configFile."keepassxc/keepassxc.ini".enable = lib.mkForce false;
|
||||
|
||||
home.activation.keepassxcConfig = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
|
||||
if [ -L ${ini} ]; then
|
||||
run rm ${ini}
|
||||
fi
|
||||
run mkdir -p ${config.xdg.configHome}/keepassxc
|
||||
run touch ${ini}
|
||||
run ${pkgs.crudini}/bin/crudini --merge ${ini} < ${declared}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user