Skip to content

Commit d26abc5

Browse files
bors[bot]Mic92
andauthored
Merge #95
95: Reduce memory consumption r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2 parents 419184c + 848a9cd commit d26abc5

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ detected `nixos-anywhere` will not try to kexec into its own image.
2020
If your system is not booted into a nixos installer than the following
2121
requirements apply for kexec to succeed:
2222

23-
- x86_64 Linux system with kexec support (most x86_64 machine do have kexec
23+
- `x86_64` Linux system with kexec support (most `x86_64` machine do have kexec
2424
support) or you have to provide your own
2525
[image](https://github.com/numtide/nixos-anywhere#using-your-own-kexec-image)
26-
- At least 2.5GB RAM (swap does not count). If you do not have enough RAM you
26+
- At least 1.5GB RAM (swap does not count). If you do not have enough RAM you
2727
will see failures unpacking the initrd), this is because kexec needs to load
2828
the whole nixos into memory.
2929

@@ -90,7 +90,7 @@ than uploaded prior to executing.
9090
9191
```shell
9292
nixos-anywhere \
93-
--kexec "$(nix build --print-out-paths github:nix-community/nixos-images#packages.x86_64-linux.kexec-installer-nixos-unstable)/nixos-kexec-installer-x86_64-linux.tar.gz" \
93+
--kexec "$(nix build --print-out-paths github:nix-community/nixos-images#packages.x86_64-linux.kexec-installer-noninteractive-nixos-unstable)/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz" \
9494
--flake 'github:your-user/your-repo#your-system' \
9595
root@yourip
9696
```
@@ -101,7 +101,7 @@ for aarch64-linux either natively or through a remote builder
101101
102102
```shell
103103
nixos-anywhere \
104-
--kexec "$(nix build --print-out-paths github:nix-community/nixos-images#packages.aarch64-linux.kexec-installer-nixos-unstable)/nixos-kexec-installer-aarch64-linux.tar.gz" \
104+
--kexec "$(nix build --print-out-paths github:nix-community/nixos-images#packages.aarch64-linux.kexec-installer-noninteractive-nixos-unstable)/nixos-kexec-installer-noninteractive-aarch64-linux.tar.gz" \
105105
--flake 'your-flake#your-system' \
106106
root@yourip
107107
```

flake.lock

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

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abort() {
4040
exit 1
4141
}
4242

43-
default_kexec_url=https://github.com/nix-community/nixos-images/releases/download/nixos-22.11/nixos-kexec-installer-x86_64-linux.tar.gz
43+
default_kexec_url=https://github.com/nix-community/nixos-images/releases/download/nixos-22.11/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz
4444
kexec_url="$default_kexec_url"
4545
enable_debug=""
4646
maybe_reboot="sleep 6 && reboot"

tests/flake-module.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
inherit pkgs;
88
inherit (inputs.disko.nixosModules) disko;
99
nixos-anywhere = config.packages.nixos-anywhere;
10-
kexec-installer = "${inputs'.nixos-images.packages.kexec-installer-nixos-unstable}/nixos-kexec-installer-${system}.tar.gz";
10+
kexec-installer = "${inputs'.nixos-images.packages.kexec-installer-nixos-unstable-noninteractive}/nixos-kexec-installer-noninteractive-${system}.tar.gz";
1111
};
1212
in
1313
{

tests/from-nixos-with-sudo.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
installer = ./modules/installer.nix;
55
installed = {
66
services.openssh.enable = true;
7-
virtualisation.memorySize = 4096;
7+
virtualisation.memorySize = 1512;
88

99
users.users.nixos = {
1010
isNormalUser = true;

tests/from-nixos.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
installer = ./modules/installer.nix;
55
installed = {
66
services.openssh.enable = true;
7-
virtualisation.memorySize = 4096;
7+
virtualisation.memorySize = 1512;
88

99
users.users.root.openssh.authorizedKeys.keyFiles = [ ./modules/ssh-keys/ssh.pub ];
1010
};

0 commit comments

Comments
 (0)