Skip to content

Commit 419184c

Browse files
bors[bot]Mic92
andauthored
Merge #94
94: bash is no longer required r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2 parents 840b980 + f76de71 commit 419184c

File tree

5 files changed

+32
-59
lines changed

5 files changed

+32
-59
lines changed

flake.lock

Lines changed: 24 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
disko = { url = "github:nix-community/disko/master"; inputs.nixpkgs.follows = "nixpkgs"; };
88
# used for testing
99
nixos-images.url = "github:nix-community/nixos-images";
10+
nixos-images.inputs.nixos-2211.follows = "";
11+
nixos-images.inputs.nixos-unstable.follows = "nixpkgs";
1012
# used for development
11-
treefmt-nix.url = "github:numtide/treefmt-nix";
13+
treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
1214
};
1315

1416

src/nixos-anywhere.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ has_sudo=\$(has sudo)
235235
has_wget=\$(has wget)
236236
has_curl=\$(has curl)
237237
has_setsid=\$(has setsid)
238-
has_bash=\$(has bash)
239238
FACTS
240239
SSH
241240
); then
@@ -256,10 +255,6 @@ if [[ ${has_tar-n} == "n" ]]; then
256255
abort "no tar command found, but required to unpack kexec tarball"
257256
fi
258257

259-
if [[ ${has_bash-n} == "n" ]]; then
260-
abort "no bash command found, but required for running the reboot script"
261-
fi
262-
263258
if [[ ${has_setsid-n} == "n" ]]; then
264259
abort "no setsid command found, but required to run the kexec script under a new session"
265260
fi

tests/from-nixos.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
--store-paths /etc/nixos-anywhere/disko /etc/nixos-anywhere/system-to-install \
3131
root@installed >&2
3232
""")
33-
installed.shutdown()
33+
try:
34+
installed.shutdown()
35+
except BrokenPipeError:
36+
# qemu has already exited
37+
pass
3438
new_machine = create_test_machine(oldmachine=installed, args={ "name": "after_install" })
3539
new_machine.start()
3640
hostname = new_machine.succeed("hostname").strip()

tests/modules/system-to-install.nix

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@
2121
partitions = [
2222
{
2323
name = "boot";
24-
type = "partition";
2524
start = "0";
2625
end = "1M";
2726
part-type = "primary";
2827
flags = [ "bios_grub" ];
2928
}
3029
{
31-
type = "partition";
3230
name = "ESP";
3331
start = "1MiB";
3432
end = "100MiB";
@@ -41,7 +39,6 @@
4139
}
4240
{
4341
name = "root";
44-
type = "partition";
4542
start = "100MiB";
4643
end = "100%";
4744
part-type = "primary";

0 commit comments

Comments
 (0)