Flake for my NixOS devices
1{...}: {
2 config,
3 lib,
4 pkgs,
5 ...
6}: {
7 options.cow.keepassxc = {
8 enable = lib.mkEnableOption "KeePassXC + autolaunch";
9 dbPath = lib.mkOption {
10 type = lib.types.nullOr lib.types.str;
11 description = "KeePassXC DB to open on DE launch if cow.gdi is on";
12 default = null;
13 };
14 };
15
16 config = lib.mkIf config.cow.keepassxc.enable {
17 cow.imperm.keepCache = [".config/keepassxc"];
18
19 programs.niri.settings.spawn-at-startup =
20 lib.optionals (config.cow.gdi.enable && config.cow.keepassxc.dbPath != null)
21 [
22 {
23 argv = [
24 "keepassxc"
25 config.cow.keepassxc.dbPath
26 ];
27 }
28 ];
29 home.packages = with pkgs; [keepassxc];
30 };
31}