diff options
| author | Isabella Bastaja <isabella@sorre.xyz> | 2026-10-26 22:05:45 +0100 |
|---|---|---|
| committer | Isabella Bastaja <isabella@sorre.xyz> | 2026-10-27 01:27:22 +0100 |
| commit | fd7019589936f504c3856c222a847fac4cfe989a (patch) | |
| tree | 44fbc90ebf092a3f06ca708562c6f2fe670913ef /hosts | |
| parent | 9c8284c94725929ac19a82b61a1b304456a1d11f (diff) | |
enode: more fixes to initrd
- add common virtio kernel modules to initrd explicitly
- import the qemu-guest module
- enable the qemuGuest service (in userland, not initrd)
- enable emergency initrd acccess
- specify partlabel mount device names manually
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/enode/impermenance.nix | 2 | ||||
| -rwxr-xr-x | hosts/enode/perform-install.sh | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/hosts/enode/impermenance.nix b/hosts/enode/impermenance.nix index 437654e..627ecd2 100644 --- a/hosts/enode/impermenance.nix +++ b/hosts/enode/impermenance.nix @@ -1,4 +1,4 @@ -{ config, utils, ... }: +{ config, ... }: let ssh-host-keys = map (k: k.path) (builtins.attrValues config.services.openssh.hostKeys); in diff --git a/hosts/enode/perform-install.sh b/hosts/enode/perform-install.sh new file mode 100755 index 0000000..5edef09 --- /dev/null +++ b/hosts/enode/perform-install.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -xeu pipefail + +HNAME="enode" +HOST="isabella@$HNAME.sorre.xyz" +DISKO_SCRIPT_OUTPUT=".#nixosConfigurations.$HNAME.config.system.build.diskoScript" +TOPLEVEL_OUTPUT=".#nixosConfigurations.$HNAME.config.system.build.toplevel" + +nix build --no-link "$DISKO_SCRIPT_OUTPUT" "$TOPLEVEL_OUTPUT" + +DISKO_SCRIPT_PATH="$(nix path-info "$DISKO_SCRIPT_OUTPUT")" +HOST_TOPLEVEL_PATH="$(nix path-info "$TOPLEVEL_OUTPUT")" + +nix copy --substitute-on-destination --to "ssh://$HOST" "$DISKO_SCRIPT_PATH" + +printf '%s\n' \ + "$DISKO_SCRIPT_PATH" \ + 'chgrp --recursive wheel /mnt/nix' \ + 'chmod --recursive g+w /mnt/nix' \ + | ssh -T "$HOST" "sudo -p '' -S -- bash -s" + +nix copy --substitute-on-destination \ + --to "ssh://$HOST?remote-store=/mnt" \ + "$HOST_TOPLEVEL_PATH" + +ssh -T "$HOST" "sudo -p -- nixos-install --verbose --no-channel-copy --closure $HOST_TOPLEVEL_PATH" |
