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