From 02b9de7372e3e2b892ac9bf54592aaabcea40f88 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 22 May 2024 17:31:06 +0100 Subject: [PATCH] auto: bootstrapping sparky --- hosts/common/users/media/default.nix | 2 +- scripts/bootstrap.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hosts/common/users/media/default.nix b/hosts/common/users/media/default.nix index f395418..c0944e6 100644 --- a/hosts/common/users/media/default.nix +++ b/hosts/common/users/media/default.nix @@ -8,7 +8,7 @@ in users.users.media = { isNormalUser = true; shell = pkgs.zsh; # default shell - #hashedPasswordFile = sopsHashedPasswordFile; + hashedPasswordFile = sopsHashedPasswordFile; password = "nixos"; openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key); diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index caaef73..f12920b 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -81,6 +81,7 @@ chmod 644 "$temp/persist/etc/ssh/ssh_host_ed25519_key.pub" # Install Nixos to target cd "$HOME/nixos" +git add . && git commit -m "auto: bootstrapping $hostname" SHELL=/bin/sh nix run github:nix-community/nixos-anywhere -- --extra-files "$temp" --flake .#"$config" root@"$ip" -i "$HOME/.ssh/id_ed25519" [ $? != 0 ] && echo "Error installing Nixos" && exit 1