Fix install.sh script

This commit is contained in:
Kevin Kandlbinder 2023-02-27 14:02:05 +00:00
parent 796010071b
commit 84bcc1a100
2 changed files with 9 additions and 8 deletions

View file

@ -9,15 +9,16 @@ while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done done
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
echo "Installing NixOS modules..." echo "Installing NixOS..."
if [ -d /etc/nixos/ssh ]; then
echo "Directory /etc/nixos/ssh exists - skipping."
else
sudo ln -s $DIR/../ssh /etc/nixos/ssh || echo "Could not link ssh assets"
fi
sudo cp -r $DIR/../* /etc/nixos/ || echo "Could not copy modules" sudo nixos-rebuild switch --flake '.#' --impure
#if [ -d /etc/nixos/ssh ]; then #sudo cp -r $DIR/../* /etc/nixos/ || echo "Could not copy modules"
# echo "Directory /etc/nixos/ssh exists - skipping."
#else
# sudo ln -s $DIR/../ssh /etc/nixos/ssh || echo "Could not link ssh assets"
#fi
echo "Done." echo "Done."

View file

@ -17,7 +17,7 @@
sops.defaultSopsFile = ./secrets/secrets.yaml; sops.defaultSopsFile = ./secrets/secrets.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.secrets.example-key = {}; sops.secrets.example_key = {};
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;