From 706c83afed6297b1186025c89dd628006eb47bb7 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Fri, 14 Jul 2023 23:50:43 -0700 Subject: [PATCH] updated sp.sh and psp.sh --- for_new_sovran_pros/psp.sh | 1 + for_new_sovran_pros/sp.sh | 52 +++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/for_new_sovran_pros/psp.sh b/for_new_sovran_pros/psp.sh index 843b73b..3bfa75d 100644 --- a/for_new_sovran_pros/psp.sh +++ b/for_new_sovran_pros/psp.sh @@ -55,6 +55,7 @@ cat <> /mnt/etc/nixos/configuration.nix git ranger fish + pwgen ]; services.openssh = { diff --git a/for_new_sovran_pros/sp.sh b/for_new_sovran_pros/sp.sh index 0af85d0..aa9e670 100644 --- a/for_new_sovran_pros/sp.sh +++ b/for_new_sovran_pros/sp.sh @@ -134,32 +134,6 @@ EOT # -pushd /etc/nixos - - nix flake update - - nixos-rebuild switch --impure - -popd - -# - -chown caddy:php /var/lib/domains -R - -chmod 770 /var/lib/domains -R - -# - -mkdir /root/.ssh/agenix - -ssh-keygen -q -N "" -t ed25519 -f /root/.ssh/agenix/agenix-secret-keys - -sed -i -e "0,/root.*/{s::root = $(cat /root/.ssh/agenix/agenix-secret-keys.pub):};s:root@nixos::" /var/lib/agenix-secrets/secrets.nix - -sed -i 's:\(root =[[:blank:]]*\)\(.*\):\1"\2";:' /var/lib/agenix-secrets/secrets.nix - -# - mkdir /var/lib/secrets touch /var/lib/secrets/nextclouddb @@ -209,6 +183,32 @@ popd # +chown caddy:php /var/lib/domains -R + +chmod 770 /var/lib/domains -R + +# + +mkdir /root/.ssh/agenix + +ssh-keygen -q -N "" -t ed25519 -f /root/.ssh/agenix/agenix-secret-keys + +sed -i -e "0,/root.*/{s::root = $(cat /root/.ssh/agenix/agenix-secret-keys.pub):};s:root@nixos::" /var/lib/agenix-secrets/secrets.nix + +sed -i 's:\(root =[[:blank:]]*\)\(.*\):\1"\2";:' /var/lib/agenix-secrets/secrets.nix + +# + +pushd /etc/nixos + + nix flake update + + nixos-rebuild switch --impure + +popd + +# + chown root:root /var/lib/secrets/main -R chown root:root /var/lib/secrets/external_ip -R