Update setup.sh
This commit is contained in:
parent
20a2fb97dc
commit
9037d7250f
1 changed files with 18 additions and 0 deletions
|
@ -1,6 +1,24 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
pushd /etc/nixos/git
|
pushd /etc/nixos/git
|
||||||
|
|
||||||
|
# Home-Manager Setup
|
||||||
|
echo ">>> Setting up Home Manager..... "
|
||||||
|
sudo mkdir /nix/var/nix/profiles/per-user/albert
|
||||||
|
home-manager switch -b backup --flake /etc/nixos/git
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
# Import and trust the GPG key
|
||||||
|
echo ">>> Setting up user GPG key..... "
|
||||||
|
drive=$(lsblk -o serial,name | grep 012345679518 | awk {'print $2'})
|
||||||
|
sudo mkdir /tmp/drive
|
||||||
|
sudo cryptsetup luksOpen /dev/${drive}3 usb-luks
|
||||||
|
sudo mount /dev/mapper/usb-luks /tmp/drive
|
||||||
|
gpg --import /tmp/drive/gpg/albert@sysctl.io/privkey.asc
|
||||||
|
sudo umount /tmp/drive
|
||||||
|
sudo rmdir /tmp/drive
|
||||||
|
sudo cryptsetup luksClose /dev/mapper/usb-luks
|
||||||
|
echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key albert@sysctl.io trust
|
||||||
|
|
||||||
# Setup SOPS
|
# Setup SOPS
|
||||||
echo "Setting up SOPS keys..... "
|
echo "Setting up SOPS keys..... "
|
||||||
echo ">>> !!!!!"
|
echo ">>> !!!!!"
|
||||||
|
|
Loading…
Reference in a new issue