pass: auto unlock password

This commit is contained in:
lelgenio 2021-06-26 11:56:34 -03:00
parent 45d6d9e2f7
commit cae19ecd0e
6 changed files with 24 additions and 3 deletions

View File

@ -209,6 +209,7 @@ dynvariables:
nproc: nproc
memory_size: env LC_ALL=C free -b | awk '/^Mem:/ {print $2}'
deezer_arl: pass show Entertainment/Deezer | awk '/^arl:/ {print $2}'
main_password: _pass_get "{{@@ mail.personal.mail @@}}" | base64
###############################################################

10
dotfiles/scripts/_gpg-unlock Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
pidof gpg-agent ||
gpg-agent --daemon
KEYGRIP=$(cat "$HOME/.pam-gnupg")
sudo cat /etc/.passwd |
base64 -d |
/usr/lib/gnupg/gpg-preset-passphrase --preset "$KEYGRIP"

View File

@ -19,6 +19,8 @@ exec_always pidof mpd || mpd --no-daemon
exec_always pidof -x mpDris2 || sleep 5s && mpDris2
# Syncthing, sync folders between stuff
exec pidof syncthing || syncthing -no-browser
# Unlock gpg-agent
exec_always _pam_unlock
###############################################################

View File

@ -40,6 +40,7 @@ actions:
create_swapfile: _create-swapfile
mount_partitions: mount -a
dbus_uuidgen: dbus-uuidgen --ensure
passwd: chmod 600 /etc/.passwd
###############################################################
@ -52,6 +53,12 @@ dotfiles:
actions:
- greetd_install
passwd:
src: passwd
dst: /etc/.passwd
actions:
- passwd
elogind:
src: elogind.conf
dst: /etc/elogind/logind.conf

View File

@ -20,6 +20,6 @@ command = "sway --config /etc/greetd/sway-config"
# in the `video` group.
user = "greeter"
# [initial_session]
# command = "{{@@ env['SHELL'] @@}}"
# user = "{{@@ env['USER'] @@}}"
[initial_session]
command = "{{@@ env['SHELL'] @@}}"
user = "{{@@ env['USER'] @@}}"

1
root/passwd Normal file
View File

@ -0,0 +1 @@
{{@@ main_password @@}}