fix: installer
Some checks failed
/ check (push) Has been cancelled

This commit is contained in:
Daniel Flanagan 2025-02-20 12:30:01 -06:00
parent a4f8a11bd1
commit 34a0473766
2 changed files with 11 additions and 6 deletions

View file

@ -55,8 +55,12 @@ ssh "root@$host" nixos-rebuild --rollback switch
## Provisioning New NixOS Hosts
Note that for best results the target flake attribute should first be built and
cached to the binary cache at `nix.h.lyte.dev`.
```shell
nix run --extra-experimental-features 'nix-command flakes' \
--accept-flake-config git+https://git.lyte.dev/lytedev/nix#installer
```
Or you can install manually with the process below:
```bash
# establish network access
@ -79,7 +83,7 @@ nix-shell --packages git --run "sudo nix run \
github:nix-community/disko -- \
--flake 'git+https://git.lyte.dev/lytedev/nix#${PARTITION_SCHEME}' \
--mode disko \
--arg disks '[ \"/dev/${DISK}\" ]'"
--arg disk '\"/dev/${DISK}\"'"
# install
nix-shell --packages git \

View file

@ -3,7 +3,7 @@
...
}:
pkgs.writeShellApplication {
name = "suspend-flink-job";
name = "installer";
runtimeInputs = with pkgs; [
fzf
jq
@ -21,7 +21,8 @@ pkgs.writeShellApplication {
nixos_host="$(nix eval --json git+https://git.lyte.dev/lytedev/nix#nixosConfigurations --apply 'builtins.attrNames' | jq -r .[] | fzf --prompt 'Select NixOS configuration')"
partition_scheme="$(nix eval --json git+https://git.lyte.dev/lytedev/nix#diskoConfigurations --apply 'builtins.attrNames' | jq -r .[] | fzf --prompt 'Select disk partition scheme (must match NixOS configuration!)')"
disk_path="/dev/$(lsblk -d --raw | tail -n +2 | fzf --prompt 'Select local disk device' | awk '{print $1}')"
disk_pass="$(echo "$pass1" | tr -d "\n")"
echo "$pass1" | tr -d "\n" > /tmp/secret.key
nix-shell --packages git --run "sudo nix run \
--extra-experimental-features nix-command \
@ -29,7 +30,7 @@ pkgs.writeShellApplication {
github:nix-community/disko -- \
--flake 'git+https://git.lyte.dev/lytedev/nix#$partition_scheme' \
--mode disko \
--arg disk '$disk_path'"
--arg disk '\"$disk_path\"'"
nix-shell --packages git \
--run "sudo nixos-install \