From feb59ce1cb570d980b0ed2b478b96757f90379fb Mon Sep 17 00:00:00 2001 From: iFargle Date: Sat, 23 Sep 2023 21:31:46 +0900 Subject: [PATCH] post-install script update --- docs/setup.sh | 13 ++++++++---- nixos/default.nix | 50 +++++++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/docs/setup.sh b/docs/setup.sh index 5b41d84f..a49d7c23 100755 --- a/docs/setup.sh +++ b/docs/setup.sh @@ -6,12 +6,17 @@ home-manager switch -b backup --flake . source ~/.bashrc # Import and trust the GPG key -read -p "Path to GPG Private Key: " gpgKey -gpg --import $gpgKey -echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key 64F6C4EB46C4543A trust +echo "Setting up user GPG key..... " +drive=(lsblk -o serial,name | grep -A 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 rmdir /tmp/drive +echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key albert@sysctl.io trust # Setup SOPS -echo "Copy this key to .sops.yaml: " +echo "!!!!! Copy this key to .sops.yaml: " sudo ssh-to-pgp \ -comment "Generated `ddate`" \ -email "root@`hostname`" \ diff --git a/nixos/default.nix b/nixos/default.nix index 6f2b7280..2f37c33e 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -26,31 +26,31 @@ # List packages installed in system profile environment.systemPackages = with pkgs; [ - sbctl - wget - killall - curl - glxinfo - neofetch - rsync - git - duf - ncdu - du-dust - home-manager - btop - iftop - nload - iotop - sops - gnupg - jq - eza - cryptsetup - parted - screen - alejandra - nixfmt + sbctl # Secureboot Control + wget # WebGet + killall # Killall + curl # Curl - For web requests + neofetch # system information viewer + rsync # copy/sync + git # git! + duf # replacement / prettier UI for df + ncdu # ncurses style browser for du/dust + du-dust # better UI for 'du" + home-manager # manage dotfiles + btop # like htop, but prettier + iftop # interface top - network usage + nload # network load - Network usage graphs + iotop # I/O top viewer - disk r/w, etc + sops # manage secrets + gnupg # GNU Privacy Guard + jq # Pretty print JSON + eza # like ls, but prettier + cryptsetup # used to open LUKS devices + parted # Disk partitioner / Formatter + screen # Terminal screen manager + alejandra # Nix code formatter + nixfmt # Nix code formatter + e2fsprogs # disk format utilities, like mkfs.ext4 ]; # Select internationalisation properties.