Commit Graph

86 Commits

Author SHA1 Message Date
Jörg Thalheim
bb76f39145 iso: default to zstd compression
For most users of nixos-generate zstd will be the better choice as
it will build and boot images much faster. Often users have to rebuild
images a couple of times before they are happy with the result.
NixOS might be better of with xz as it saves download and storage cost
for images.
2024-05-19 13:50:34 +02:00
Proesmans Bert
2ba4060480
Set nixos diskSize option only if specialArgs.diskSize exists 2024-03-03 15:43:35 +01:00
bri
5b77724069 for containers & kexec, boot.loader.*.enable = lib.mkForce false; 2024-02-26 09:38:40 +00:00
lassulus
fa146e1a15
Merge pull request #204 from tylerjl/qcow-efi
qcow-efi format with ESP mount and configurable diskSize
2024-02-20 11:11:16 +07:00
James Alseth
4c7b914d1f Add disk-size argument
Many formats generate an image only large enough for the generated NixOS
config. This quickly runs out of space for NixOS servers that are updated
over time rather than being redeployed with fresh images.

Signed-off-by: James Alseth <james@jalseth.me>
2024-02-11 11:47:50 -08:00
Physics Enthusiast
843e2f04c7 Fix failing azure builds 2024-02-08 15:13:38 +00:00
Vladimir Pouzanov
13ff43edfb Fix the extension breaking the find query.
In af3d3a7538, filename was renamed to fileExtension and used in find -name. This breaks kexec as it used to have the actual file name glob in there.

Given it's the only file produced it seems safe to just remove the path component.
2024-02-08 11:16:16 +00:00
Vladimir Pouzanov
4d0bc031cc Restore the kexec funtionality 2024-02-08 11:16:16 +00:00
Jeremiah S
d76f0910af
fix: extra install commands require full pathing 2024-01-18 21:46:09 -05:00
Jörg Thalheim
73bb6747ef drop deprecated grub.version == 2 warning 2024-01-16 10:48:10 +01:00
Tyler Langlois
55431724c5 qcow-efi: define formatAttr as qcow-efi to avoid colliding with qcow 2023-09-18 12:50:03 -06:00
Tyler Langlois
1424032283 qcow-efi: support other arch console flags in kernelParams 2023-09-18 11:44:20 -06:00
Tyler Langlois
062cb2f555 qcow-efi: rename diskSize option to boot.diskSize
Ref: https://github.com/nix-community/nixos-generators/pull/204#discussion_r1088406722
2023-09-18 11:38:46 -06:00
Tyler Langlois
dd15e1f875 Merge branch 'master' into qcow-efi 2023-09-18 11:34:58 -06:00
lassulus
af3d3a7538 rename filename to fileExtension 2023-07-22 16:20:50 +02:00
lassulus
efb2d33d4f formats *: set filename to the fileending 2023-07-21 14:58:38 +02:00
DavHau
0f203cabb3 Merge branch 'master' into all-formats 2023-05-30 16:17:09 +02:00
DavHau
fb30cf1cbe reformat all files 2023-05-30 10:21:34 +02:00
lassulus
859c5d584c formats install-iso: remove isoName 2023-05-30 10:16:52 +02:00
Antonio Yang
7e391962ce set "nixos.iso" as default name for iso image 2023-05-30 15:35:56 +08:00
DavHau
32f0192366 move some broken formats to ./formats-broken
- kexec + kexec-bundle: tries accessing <nixpkgs>
- cloudstack: module eval error
2023-05-29 11:08:44 +02:00
DavHau
435e0d366f add checks for al formats 2023-05-29 11:05:09 +02:00
DavHau
c1e0b7feec reformat all files 2023-05-29 09:35:13 +02:00
Antonio Yang
62bb13bb6c add isoName option 2023-05-29 11:10:57 +08:00
Tyler Langlois
7b19ba9c21 Parameterize the configurable disk image size 2023-01-26 10:31:59 -07:00
Tyler Langlois
14cd7ec3fd Merge branch 'master' into qcow-efi 2023-01-26 09:44:11 -07:00
Tyler Langlois
8dca4db8f3 Add mount point for EFI/ESP partition on qcow-efi 2023-01-25 17:03:03 -07:00
LegitMagic
4e4a8b5233
formats/sd-aarch64: use nixpkgs import 2023-01-25 10:14:55 -05:00
LegitMagic
003d67f51c
formats/sd-aarch64-installer: use proper installer from nixpkgs 2023-01-18 19:58:38 -05:00
Tyler Langlois
ca58468f8c Raise qcow-efi disk image size 2023-01-04 21:57:34 -07:00
Tyler Langlois
ebdcef9ced Merge remote-tracking branch 'threefoldtech/qcow-efi' into qcow-efi 2023-01-04 21:46:00 -07:00
Viv Lim
ac1ffdae0f raw-efi: Locate ESP by disk label instead of /dev/vda1
Locating the ESP via /dev/vda1 fails when booting on hardware.
Also, make the grub timeout configurable on raw + raw-efi.
2022-12-17 23:55:53 -08:00
Ashraf Fouda
b97311ab98 Adds qcow-efi image
Signed-off-by: Ashraf Fouda <ashraf.m.fouda@gmail.com>
2022-11-22 16:51:18 +02:00
Per Magnus Veierland
0f1d89a63c formats/linode: Add support for generating linode images
Builds `result/nixos.img.gz` image which can be uploaded and run
directly on Linode without an installation process.

Known working settings when setting up Linode:

Configure two disks:
- Label: /dev/sda   Filesystem: ext4 (from uploaded .img.gz image)
- Label: /dev/sdb   Filesystem: swap

Create configuration:
- VM Mode: Paravirtualization
- Kernel: GRUB 2
- Run Level: Run Default Level
- Memory Limit: Do not set any limits on memory usage
- Block Device Assignment:
- - /dev/sda -> /dev/sda
- - /dev/sdb -> /dev/sdb
- Use custom root: No
- Root device: /dev/sda
- Enable distro helper: No
- Disable updatedb: No
- Enable modules.dep helper: No
- Auto-mount devtmpfs: No
- Auto-configure networking: No

Using information from:
- https://www.linode.com/docs/guides/install-nixos-on-linode/
- https://gist.github.com/nixy/e964240d301e0db513463f11bbb22d26
- https://gist.github.com/nocoolnametom/a359624afce4278f16e2760fe65468cc
2022-08-16 12:25:04 +02:00
Lassulus
2992b43912
Merge pull request #174 from nix-community/qcow-aarch64 2022-08-15 17:48:34 +03:00
lassulus
5b422c3cb0 qcow: enable biosboot only for x86 2022-08-15 08:34:17 +02:00
Lassulus
898edde476
Merge pull request #163 from tomeon/system-build-type-change-backcompat
Handle `config.system.build` type change from lazy attrset to submodule
2022-06-22 14:36:02 +02:00
Matt Schreiber
b34a6ac4e6
No lib.mkForce in system.build.kexec_tarball def'n
on nixpkgs versions prior to the commit that changed
config.system.build's type from a lazy attribute set to a submodule.

Prior to this type change, there is no system.build.kexec_tarball option
declared, so the NixOS module system does not resolve
priorities/overrides in the config.build.kexec_tarball definition.

That is, with lib.mkForce, the config.build.kexec_tarball definition
ends up being something like:

    {
      _type = "override";
      content = <...>;
      priority = 50;
    }

Removing lib.mkForce allows us to successfully and sensibly interpolate
the value (== outPath) of system.build.kexec_tarball in
system.build.kexec_bundle's builder script.

Likewise, no lib.mkOverride for system.build.raw.
2022-06-14 21:32:25 -04:00
Matt Schreiber
d486c0f864
kexec-bundle: define filename pattern 2022-06-14 21:29:37 -04:00
lassulus
8fa0a1f52b vm-nogui: fix syntax error 2022-04-26 19:09:49 +02:00
lassulus
daa142a20b raw-efi: override build.raw harder 2022-04-26 19:09:36 +02:00
lassulus
db5c176919 raw-efi: add /boot partition 2022-04-26 18:53:24 +02:00
lassulus
b0326ae4f0 formats: init docker 2022-04-19 19:09:35 +02:00
lassulus
117ed432a4 kexec: fix kexec_tarball harder 2022-04-09 18:49:40 +02:00
Lassulus
f558711174
Merge pull request #135 from nix-community/vm-nogui-resize
formats vm-nogui: resize only if /dev/tty exists
2022-04-08 13:45:36 +01:00
lassulus
d9de54155c kexec-bundle: get kexec_tarball from module system 2022-03-29 10:13:03 +02:00
lassulus
85014f358b formats kexec: fix multiple definition 2022-03-16 13:24:18 +01:00
illustris
87866f310e add proxmox LXC format 2022-02-16 00:05:01 +05:30
lassulus
494397272f formats vm-nogui: resize only if /dev/tty exists 2022-02-02 14:35:39 +01:00
jbpratt
5e08c56f66 implement kubevirt format
requires https://github.com/NixOS/nixpkgs/pull/151482

Signed-off-by: jbpratt <jbpratt78@gmail.com>
2021-12-21 03:02:40 -06:00