auto: bootstrapping sparky

This commit is contained in:
Sam 2024-05-26 20:31:07 +01:00
parent 9296b4b4aa
commit cf831cee04
2 changed files with 8 additions and 9 deletions

View File

@ -228,11 +228,11 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1716740590, "lastModified": 1716751860,
"narHash": "sha256-ZmoCxovGSdsKIxzZcbFWZH8OjFqcXx7iKSSA1PkhjU4=", "narHash": "sha256-n3Z0B0UtG9t7DIIdm+q7/nts0tL0nlZZXT0xoMME9+4=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "32406415be32389c8019ab6e8aaaf6ac259cb773", "rev": "2786cfc98337e78861ae63089749caeae1ece421",
"revCount": 52, "revCount": 53,
"type": "git", "type": "git",
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git" "url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
}, },
@ -300,11 +300,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1716739594, "lastModified": 1716746631,
"narHash": "sha256-0iXuhpC57QUNaEG0qRMufWEL9mRPYEHfrnPNMOsO7fY=", "narHash": "sha256-0/G9FQaVm321BoCKREwRqr4l93ZwtvW+4x8gjN67bWs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "23276f629b0c68ce869f32fae41323763981039c", "rev": "9697385115fe557468b2ddcbd1277602b3e58d5e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -62,13 +62,12 @@ sed -i "{
just update-sops-secrets && just update-flake-secrets && just update-flake just update-sops-secrets && just update-flake-secrets && just update-flake
echo -e "\nNeed to change ownership of temp directories, enter sudo password if prompted:\n" echo -e "\nNeed to change ownership of temp directories, enter sudo password if prompted:\n"
sudo chown root:root -R "$temp"
# Install Nixos to target # Install Nixos to target
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" --flake .#"$config" root@"$ip" -i "$HOME/.ssh/id_ed25519" nix-shell -p nixos-anywhere --run "nixos-anywhere -- --extra-files ""\"$temp""\" --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