updated sp.sh and psp.sh

This commit is contained in:
naturallaw77 2023-07-14 23:50:43 -07:00
parent 7393be49b4
commit 706c83afed
2 changed files with 27 additions and 26 deletions

View File

@ -55,6 +55,7 @@ cat <<EOT >> /mnt/etc/nixos/configuration.nix
git
ranger
fish
pwgen
];
services.openssh = {

View File

@ -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