Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | { pkgs |
| 2 | , home |
| 3 | , config |
| 4 | , username |
| 5 | , ... |
Skyler Grey | cea6251 | 2022-09-01 23:51:07 +0100 | [diff] [blame] | 6 | }: { |
| 7 | home = { |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 8 | home.packages = [ pkgs.keepassxc ]; |
Skyler Grey | cea6251 | 2022-09-01 23:51:07 +0100 | [diff] [blame] | 9 | wayland.windowManager.sway.config.startup = [ |
| 10 | { |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 11 | command = builtins.replaceStrings [ "\n" ] [ " " ] '' |
Skyler Grey | cea6251 | 2022-09-01 23:51:07 +0100 | [diff] [blame] | 12 | ${pkgs.coreutils}/bin/cat |
| 13 | ${config.sops.secrets.keepassPassword.path} | |
| 14 | ${pkgs.keepassxc}/bin/keepassxc --pw-stdin |
| 15 | ${home.home.homeDirectory}/Sync/KeePass\ Vaults/Passwords.kdbx |
| 16 | ''; |
| 17 | } |
| 18 | ]; |
| 19 | }; |
| 20 | config = { |
| 21 | environment.persistence."/nix/persist".users.${username}.directories = [ |
| 22 | ".config/keepassxc" |
| 23 | ]; |
| 24 | sops.secrets.keepassPassword = { |
| 25 | mode = "0400"; |
| 26 | owner = config.users.users.${username}.name; |
| 27 | group = config.users.users.nobody.group; |
| 28 | }; |
| 29 | }; |
| 30 | } |