2.6 KiB
Password Manager
This module will automatically install pass as your password manager. It also provides a custom version of passmenu using bemenu for Wayland sessions called passmenu-bemenu and configures passff for your web browser.
View the synix Home Manager module on Forgejo.
Setup
It is assumed that you have a GPG key.
HM config
imports = [
inputs.synix.homeModules.passwordManager
];
programs.passwordManager = {
enable = true;
key = "YOUR_GPG_KEYGRIP";
wayland = true; # if you are using Wayland
};
Get your keygrip with
gpg -K --with-keygrip
Password Store
pass uses a Password Store to manage your password files. If this is your first time using pass, follow option a). If you already have a remote git repository to store your password-store, follow option b).
a) Initialize a new Password Store
Read the introduction and setup guide on the pass home page.
b) Cloning your remote password-store repository
The following guide assumes that you have your private GPG key on a luks encrypted USB partition which is needed to access your remote repo through ssh.
-
Identify the USB device: Identify the device name for your USB drive using the
lsblkorfdisk -lcommand.lsblkLook for the device corresponding to your USB drive (e.g.,
/dev/sdb1). -
Unlock the LUKS partition: Unlock the LUKS partition with the
cryptsetup luksOpencommand. Replace/dev/sdX1with the actual device name of your USB partition.sudo cryptsetup luksOpen /dev/sdX1 cryptYou will be prompted to enter the passphrase for the LUKS partition.
-
Mount the unlocked partition: Mount the unlocked LUKS partition to access the files.
sudo mount /dev/mapper/crypt /mnt -
Import the GPG key: Use the
gpg --importcommand to import the GPG key from the mounted USB partition.gpg --import /mnt/path/to/privatekey.gpg -
Unmount and close the LUKS partition: After importing the key, unmount the partition and close the LUKS mapping.
sudo umount /mnt sudo cryptsetup luksClose crypt -
Clone your password store repository: Clone your password store repository using the
git clonecommand, for example:git clone ssh://example.tld:/home/you/git/password-store.git ~/.local/share/password-store