From 730ae4c4f22c1277e878d9447f357d263093977c Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Wed, 15 Nov 2023 13:37:13 +0100 Subject: [PATCH] switch to flake version of nixos-anywhere due to nixos-unstable issue --- README.md | 2 +- bootstrap.sh | 2 +- flake.nix | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fef1f04..c8e0376 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Additionally, it deploys an age identity, which is later used for decrypting sec 1. Make sure your have a [Secret service](https://www.gnu.org/software/emacs/manual/html_node/auth/Secret-Service-API.html) running (such as Keepassxc) that provides the age identity. 2. Ensure you have root SSH access to the server. -3. Run nixos-anywhere: `./bootstrap ` +3. Run nixos-anywhere: `./bootstrap.sh ` ## Deployment diff --git a/bootstrap.sh b/bootstrap.sh index 69257bc..0633b1d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -40,4 +40,4 @@ secret-tool lookup age-identity "$servername" > "$temp/root/age_ed25519" chmod 600 "$temp/root/age_ed25519" # Install NixOS to the host system with our age identity -nixos-anywhere --extra-files "$temp" --flake ".#${servername}" "root@${servername}.hyp" +nix run github:numtide/nixos-anywhere -- --extra-files "$temp" --flake ".#${servername}" "root@${servername}.hyp" diff --git a/flake.nix b/flake.nix index bba273f..e034fd9 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,10 @@ devShells.${system}.default = pkgs.mkShell { packages = [ pkgs.libsecret - pkgs-unstable.nixos-anywhere + # TODO: using nixos-anywhere from nixos-unstable produces buffer overflow. + # Related to this issue: https://github.com/nix-community/nixos-anywhere/issues/242 + # Should wait until this is merged in nixos-unstable. + # pkgs-unstable.nixos-anywhere pkgs-unstable.deploy-rs ]; };