From 84bcc1a10034bc0e81073b3b11127ce5f93f1e66 Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Mon, 27 Feb 2023 14:02:05 +0000 Subject: [PATCH] Fix install.sh script --- nixos/install.sh | 15 ++++++++------- nixos/kevin-tp/configuration.nix | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/nixos/install.sh b/nixos/install.sh index b5a4f33..711081d 100755 --- a/nixos/install.sh +++ b/nixos/install.sh @@ -9,15 +9,16 @@ while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli done 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 -# 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" echo "Done." diff --git a/nixos/kevin-tp/configuration.nix b/nixos/kevin-tp/configuration.nix index 38afceb..4ea5ea7 100644 --- a/nixos/kevin-tp/configuration.nix +++ b/nixos/kevin-tp/configuration.nix @@ -17,7 +17,7 @@ sops.defaultSopsFile = ./secrets/secrets.yaml; sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - sops.secrets.example-key = {}; + sops.secrets.example_key = {}; boot.loader.systemd-boot.enable = true;