auto: bootstrapping sparky

This commit is contained in:
Sam 2024-05-26 17:23:15 +01:00
parent 3c4e2bd19e
commit 9296b4b4aa
2 changed files with 10 additions and 10 deletions

View File

@ -228,11 +228,11 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1716740534, "lastModified": 1716740590,
"narHash": "sha256-dmhiwpEQfk49yYv4q+UrpmH4TQSPzCpzV4635wvO93g=", "narHash": "sha256-ZmoCxovGSdsKIxzZcbFWZH8OjFqcXx7iKSSA1PkhjU4=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "204907123c7a9a7dde23200cf9096cb08c7169fb", "rev": "32406415be32389c8019ab6e8aaaf6ac259cb773",
"revCount": 51, "revCount": 52,
"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": 1716733566, "lastModified": 1716739594,
"narHash": "sha256-Zu0fn7bC+M/LwOOkR1RmeoOuCIbvvFwuqTldVBVe4WY=", "narHash": "sha256-0iXuhpC57QUNaEG0qRMufWEL9mRPYEHfrnPNMOsO7fY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "8212bf1cd2d2dfe6ba521dd8c65a13b67e562d1a", "rev": "23276f629b0c68ce869f32fae41323763981039c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -42,9 +42,6 @@ ssh-keygen -t ed25519 -f "$temp/persist/etc/ssh/ssh_host_ed25519_key" -C root@"$
chmod 600 "$temp/persist/etc/ssh/ssh_host_ed25519_key" chmod 600 "$temp/persist/etc/ssh/ssh_host_ed25519_key"
chmod 644 "$temp/persist/etc/ssh/ssh_host_ed25519_key.pub" chmod 644 "$temp/persist/etc/ssh/ssh_host_ed25519_key.pub"
echo -e "\nNeed to change ownership of temp directories\n"
sudo chown root:root -R "$temp"
# Generate age key from target host and user public ssh key # Generate age key from target host and user public ssh key
echo "Generating age key from target host and user ssh key" echo "Generating age key from target host and user ssh key"
HOST_AGE_KEY=$(nix-shell -p ssh-to-age --run "cat $temp/persist/etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age") HOST_AGE_KEY=$(nix-shell -p ssh-to-age --run "cat $temp/persist/etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age")
@ -64,6 +61,9 @@ 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"
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