auto: bootstrapping sparky

This commit is contained in:
Sam 2024-05-26 14:19:32 +01:00
parent b7e0b6bc84
commit 6a8c8a98c4
2 changed files with 5 additions and 5 deletions

View File

@ -228,11 +228,11 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1716729487, "lastModified": 1716729565,
"narHash": "sha256-mf+lK/G5cuJjXlsBTlLpOqBw7Qx+H1ZQ8x4MohX6OO8=", "narHash": "sha256-ubpkD1U0ZNNREFo8XSh3M/arcQZKgNXiTq1cSNijQ+U=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "36900f87c79f7b63a39b7c134963c5c17063a616", "rev": "66fef743001650925899d14cdd9ef28825428c93",
"revCount": 45, "revCount": 46,
"type": "git", "type": "git",
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git" "url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
}, },

View File

@ -70,7 +70,7 @@ echo "$luks_secret" > /tmp/luks_secret.key
cd "$HOME/nixos" cd "$HOME/nixos"
git add . && git commit -m "auto: bootstrapping $hostname" && git push git add . && git commit -m "auto: bootstrapping $hostname" && git push
SHELL=/bin/sh nix run github:nix-community/nixos-anywhere -- --extra-files "$temp_ssh" --disk-encryption-keys /tmp/luks_secret.key --flake .#"$config" root@"$ip" -i "$HOME/.ssh/id_ed25519" SHELL=/bin/sh nix run github:nix-community/nixos-anywhere -- --extra-files "$temp_ssh" --disk-encryption-keys /tmp/luks_secret.key /tmp/luks_secret.key --flake .#"$config" root@"$ip" -i "$HOME/.ssh/id_ed25519"
[ $? != 0 ] && echo "Error installing Nixos" && exit 1 [ $? != 0 ] && echo "Error installing Nixos" && exit 1
## Delete keys from local known_hosts ## Delete keys from local known_hosts