Jörg Thalheim and Jörg Thalheim
916506443e
make-disk-image: quote $rootMountPoint for consistency
...
All other usages of $rootMountPoint in this file are quoted, so apply
the same style here for readability.
2025-12-19 13:25:02 +00:00
Jörg Thalheim and Jörg Thalheim
6b172212b6
disko-install: resolve symlinks in mount point path
...
Nix refuses to operate when the store path or its parent directories
contain symlinks. On some systems /mnt can be a symlink, causing
disko-install to fail with:
error: the path '"/mnt"' is a symlink; this is not allowed for the
Nix store and its parent directories
Use realpath to resolve symlinks before passing the mount point to
nix-store and nixos-install commands.
2025-12-19 13:25:02 +00:00
Jörg Thalheim and Jörg Thalheim
8e68aa819d
disko-images: add copyNixStoreThreads option for configurable parallelism
...
Allow users to override the automatic thread count detection for nix
store copying. The default "auto" behavior remains unchanged (min of
nproc and 8), but users can now specify a fixed thread count for
environments where the automatic detection isn't optimal.
2025-12-09 08:59:57 +00:00
Jörg Thalheim and Jörg Thalheim
10cdd63203
disko-images: switch back from xcp to cp for improved stability
2025-12-09 08:59:57 +00:00
Jörg Thalheim and Jörg Thalheim
e86a890795
stop using pkgs.path
...
pkgs.path is an expensive copy operation that slow down evaluation by a
lot.
2025-11-20 15:07:44 +00:00
Jörg Thalheim and Jörg Thalheim
a19c2b6d3a
tests: use nixpkgs qemu-common for proper machine type configuration
...
QEMU on aarch64 requires an explicit machine type (e.g., '-machine virt'),
unlike x86_64 which has a default. Previously, the test script hardcoded
'qemu-kvm' without machine type arguments, causing aarch64 tests to fail
with "No machine specified, and there is no default".
By importing and using nixpkgs' qemu-common.nix library, we reuse the
existing platform-specific QEMU configuration logic.
2025-11-20 13:42:11 +00:00
Jörg Thalheim and Jörg Thalheim
af087d076d
disko: drop more eval warnings
2025-11-04 17:23:16 +00:00
Jörg Thalheim and Jörg Thalheim
3f65d72ca6
disko/tests: silence mdadm tests
2025-11-04 17:23:16 +00:00
Jörg Thalheim and Jörg Thalheim
d377b56993
disko-install: resolve flake store path before using getFlake
...
otherwise operate on a path rather than the git flake
2025-11-04 17:23:16 +00:00
Jörg Thalheim and Jörg Thalheim
a5c4f2ab72
make-disk-image: use modules output of a kernel if present
...
This is a hotfix that could be reverted if we get:
https://github.com/NixOS/nixpkgs/pull/439178
in.
2025-09-01 13:33:49 +00:00
Jörg Thalheim and Jörg Thalheim
bafad29f89
make-disk-image: also use xcp
2025-08-25 09:53:42 +00:00
Jörg Thalheim and Jörg Thalheim
49c1bc1b34
disko-install: switch to xcp
2025-08-25 09:53:42 +00:00
Jörg Thalheim and Jörg Thalheim
17d08c65c2
CONTRIBUTING.md: add documentation on how to run tests
2025-06-06 09:05:14 +00:00
Jörg Thalheim and Jörg Thalheim
6d06f63fc0
use fileset when building disko
...
this can save us some rebuilds in CI
2025-06-06 09:02:11 +00:00
Jörg Thalheim and Jörg Thalheim
df522e787f
only use nom if we write to a terminal
2025-05-20 12:07:15 +00:00
Jörg Thalheim and Jörg Thalheim
85555d27de
remove broken flakestry github action
...
This has been throwing http 500 for a while.
2025-05-08 18:33:44 +00:00
Jörg Thalheim and Jörg Thalheim
6ca7c94d6a
create-release: indent version.nix according to nixfmt
2025-05-08 18:33:44 +00:00
Jörg Thalheim and Jörg Thalheim
14afb10129
release: reset released flag
2025-05-08 18:21:21 +00:00
Jörg Thalheim and Jörg Thalheim
a956a7c255
release: v1.12.0
2025-05-08 18:21:21 +00:00
Jörg Thalheim and Jörg Thalheim
c7e0b00007
diskoImagesScript: unset NIX_REMOTE
...
for some reason this is set and breaks running disko outside of the vm
2025-05-08 09:07:26 +00:00
Jörg Thalheim and Jörg Thalheim
aba0ae38df
fix evaluation of disko-images example
2025-05-08 09:07:26 +00:00
Jörg Thalheim and Jörg Thalheim
b5cfd59e9a
fix documentation on booting disko inside a VM
...
fixes https://github.com/nix-community/disko/issues/1018
2025-05-08 09:07:26 +00:00
Jörg Thalheim and Jörg Thalheim
76c0a6dba3
udevadm settle: use timeout
...
there are cases where this can just indefinitly hang as we can see in VM
tests. Let's add a tie breaker.
2025-04-08 20:46:43 +00:00
Jörg Thalheim and Jörg Thalheim
a8e75da08f
disko-deactivate: fix jq syntax
2025-04-08 18:03:50 +00:00
Jörg Thalheim and Jörg Thalheim
8f806681d7
tree-wise: quote path correctlys
2025-04-08 15:36:04 +00:00
Jörg Thalheim and Jörg Thalheim
b36e87600d
zfs: properly disable zfs-based swap
2025-04-01 15:42:50 +00:00
Jörg Thalheim and Jörg Thalheim
212ff71553
allow to build cli
...
this is useful for format scripts.
A remote builder is still necessary
2025-04-01 15:42:50 +00:00
Jörg Thalheim and Jörg Thalheim
b2c95fb68f
make devshell usuable on macOS
2025-04-01 15:42:50 +00:00
Jörg Thalheim
eea057603d
fix syntax of disk-deactivate.jq
2025-03-12 13:19:46 +01:00
Jörg Thalheim
87d86e499c
fix eval for make-disk-image test
2025-03-11 10:11:35 +01:00
Jörg Thalheim and Jörg Thalheim
6c1b834456
also deactivate swap partitions
2025-03-11 09:06:40 +00:00
Jörg Thalheim and Jörg Thalheim
af4a580628
docs/disko-images: fix codeblocks
2025-02-17 11:30:27 +00:00
Jörg Thalheim and Jörg Thalheim
4edb87a2ac
test explicit gpt uuid optoin
2025-02-15 01:27:47 +00:00
Jörg Thalheim and Lassulus
79a12e659b
disko: fix postVM beeing empty
2025-01-11 09:56:21 +00:00
Jörg Thalheim
7ea6edd857
zfs-with-vdevs: add an example for using absolute device paths
...
This is the only way to assign devices rather than fixed gpt partitions.
Without reading the code it's not very obvious how disko actually
assigns devices to zpools.
2024-12-24 14:45:56 +01:00
Jörg Thalheim
d8f3cfc582
zfs: run load-key on mount
2024-12-20 14:24:53 +01:00
Jörg Thalheim
60375cf096
cli: remove traceValSeq that shouldn't be there
2024-12-20 14:24:53 +01:00
Jörg Thalheim
dcd15a37f7
make-disk-image fix virtiofs support
2024-12-16 09:27:07 +01:00
Jörg Thalheim
d32f2d1750
release: reset released flag
2024-12-13 12:09:27 +01:00
Jörg Thalheim
65a441502c
release: v1.10.0
2024-12-13 12:09:27 +01:00
Jörg Thalheim
22cd4b7e49
check for db.sqlite rather than /nix/store
...
since we initialize the database last, it's safe to use the database as
a sentinel path
2024-12-05 13:05:22 +01:00
Jörg Thalheim
98894c8598
make-disk-image: create directories images in out path
...
In case we are crossing some filesystem boundary (i.e. /tmp -> /nix/store),
this is faster. Also tmpfs might be probelemantic regarding memory usage.
2024-12-05 13:05:22 +01:00
Jörg Thalheim
aa006252c8
add unmount feature
2024-11-29 14:44:15 +01:00
Jörg Thalheim
0433c7e883
also passthrough rootfs mountoptions
2024-11-24 18:39:57 +01:00
Jörg Thalheim and Michael Hoang
fd3e326e9a
disable swap in disko-install
...
Update disko-install
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com >
2024-11-22 12:45:57 +01:00
Jörg Thalheim
eb1bb9fe27
disko-install: allow to override mountpoints and don't manage them in dry-run
2024-11-21 14:11:02 +01:00
Jörg Thalheim
4cbd22d868
allow to run dry-run without using root
2024-11-21 12:30:14 +01:00
Jörg Thalheim
6bfa3a18d4
tests/interactive-cryptsetup: make waiting for passphrase more robust
2024-11-08 11:07:09 +01:00
Jörg Thalheim
a8bdb16b47
tests/disko-install: fix eval
2024-11-08 08:38:31 +01:00
Jörg Thalheim
dd3d2a5e93
fix offline installation
2024-11-08 08:33:11 +01:00
Jörg Thalheim and mergify[bot]
48ebb57785
docs/interactive-vms: simplify usage to just one nix run
2024-10-05 06:23:52 +00:00
Jörg Thalheim and mergify[bot]
28c5af1e16
interactive-vm: allow to override virtualisation.memorySize
...
Users might set this value for building images but than need different
values when they run interactive virtual machines.
2024-10-05 06:23:52 +00:00
Jörg Thalheim
4e30bc7921
zfs-with-vdevs: increase pool import timeout
...
Fix fixes a long-standing test failures we have with the zfs-with-vdevs.
2024-10-01 10:08:10 +02:00
Jörg Thalheim
fc3ba6985f
only set boot.initrd.preDeviceCommands if we boot with script-based stage1
2024-10-01 09:58:39 +02:00
Jörg Thalheim
91cd091669
zpool: fix default value for cache
...
we want an empty list instead of null
2024-10-01 08:55:41 +02:00
Jörg Thalheim and mergify[bot]
6d42596a35
lvm: add missing dm-snapshot
...
Usually this is added by nixos-generate-config.
However now that we run nixos-generate-config before disko or we even
run nixos-facter, we likely not see the LVM block devices anymore.
2024-09-24 16:53:30 +00:00
Jörg Thalheim
e72de0702d
add workaround for failing zpool import test
2024-09-23 15:07:20 +02:00
Jörg Thalheim and mergify[bot]
51994df8ba
imageBuilder: add defaultText
...
otherwise documentation depends on the hostname to be set
2024-09-20 14:23:16 +00:00
Jörg Thalheim
9adb48e682
add workaround for flakey zfs tests
2024-09-20 15:16:46 +02:00
Jörg Thalheim
93c1dde419
tests/f2fs: add compression
...
This is a regression test for shellcheck, where we had to disable SC2054
2024-09-20 15:02:37 +02:00
Jörg Thalheim
da8bfaf1d5
shellcheck: also disable SC2054
2024-09-20 14:55:36 +02:00
Jörg Thalheim
bc7fd7238a
filesystem: escape shell args
2024-09-20 14:47:45 +02:00
Jörg Thalheim
3646c27805
update project logo
...
fixes https://github.com/nix-community/disko/issues/781
2024-09-19 21:57:32 +02:00
Jörg Thalheim
8f0f75f1a8
zpool: better error message if zpool has no assigned devices
2024-09-03 17:11:42 +02:00
Jörg Thalheim
736c8150b9
disk-deactivate: also clear zpool labels
...
this helps to avoid ghost pools.
2024-09-03 17:10:47 +02:00
Jörg Thalheim
c789d113c6
disk-deactivate: only run zfs command if they are present
2024-09-03 17:10:47 +02:00
Jörg Thalheim and mergify[bot]
bec6e3cde9
examples: rename vdb -> main
2024-07-19 19:33:40 +00:00
Jörg Thalheim and mergify[bot]
d185770ea2
examples: drop priority as we now have a reasonable default
2024-06-30 07:50:33 +00:00
05f4e223b5
gpt: move boot partitions to the front of disko
...
Than we no longer need to do this in our examples.
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com >
2024-06-30 07:50:33 +00:00
Jörg Thalheim and mergify[bot]
423b86a7f7
disko-install: don't copy channel
...
Since we use flakes, channels have no buisness.
This is consistent with nixos-anywhere.
2024-06-29 05:47:47 +00:00
Jörg Thalheim and mergify[bot]
115311bc39
zfs: try to import zpool in incremental mode
...
if the pool is not imported, zfs list will return a value. So to check
that the pool does not exist, we also import it.
fixes https://github.com/nix-community/disko/issues/690
2024-06-28 13:52:20 +00:00
Jörg Thalheim
96cab883db
zfs: when dataset already exist, only update dataset options
2024-06-28 13:53:07 +02:00
Jörg Thalheim and mergify[bot]
1bbdb06f14
update quickstart to use templates from disko-templates
2024-06-09 06:40:59 +00:00
Jörg Thalheim and mergify[bot]
804ab2de77
treewide: reformat with nix fmt
2024-06-09 06:40:59 +00:00
Jörg Thalheim and mergify[bot]
398acc470f
update to new nixos test api
2024-06-07 14:20:40 +00:00
Jörg Thalheim and mergify[bot]
7fc7009c89
docs/disko-images: drop non-existing flag
...
fixes https://github.com/nix-community/disko/issues/664
2024-06-05 08:06:42 +00:00
Jörg Thalheim and mergify[bot]
b106b5df36
also link gpt migration guide in the manual
2024-06-03 11:58:45 +00:00
Jörg Thalheim and mergify[bot]
6de2014749
make-disk-image: make efi variables writeable
2024-06-03 11:52:20 +00:00
Jörg Thalheim
f321bc4723
add diskoScript.drvPath for offline installations
2024-05-29 12:37:19 +02:00
Jörg Thalheim and mergify[bot]
0e507d73bf
disko: allow importing disko twice
...
nixos deduplicate imports according to files.
By importing a file instead of an anonymous function,
we can import the same file multiple times without creating conflicts.
2024-05-11 16:29:00 +00:00
Jörg Thalheim
718565dfbb
drop dependency on xcp
...
It's actually not faster in combination with xargs...
2024-05-07 08:53:10 +02:00
Jörg Thalheim
babc1554e8
drop duplicated disko-install definition
2024-05-07 08:53:10 +02:00
Jörg Thalheim
cdefe26742
load database with checksum again but do the same in disko-install
2024-05-07 08:53:10 +02:00
Jörg Thalheim
8a4585a200
disko-images: replace nix-copy with cp
...
This hopefully fixes the large memory consumption we have seen in the
past. Also presumably coreutils cp is more tuned for performance than
whatever nix does.
2024-05-06 20:51:39 +02:00
Jörg Thalheim
4f8c8580b4
fix building images when non-binary reproducible builds are present
...
closure-info has one flaw, it's possible that this file contains stale
information when build are not reproducible and the local checksum
doesn't match what the remote build created.
The work-around here is that we disregard the hashes and re-compute with
what nar's we actually have locally instead.
2024-05-06 19:29:20 +02:00
Jörg Thalheim and Jörg Thalheim
5eaf747af3
README: link to disko-install and disko-images
2024-04-29 17:43:27 +02:00
Jörg Thalheim
e5b3299a14
README: link to disko-install and disko-images
2024-04-29 17:41:29 +02:00
Jörg Thalheim and Jörg Thalheim
39de9e8cca
move disko-images to its own chapter
2024-04-29 17:05:43 +02:00
Jörg Thalheim
6fad976102
fix mergify configuration
2024-04-23 11:19:26 +02:00
Jörg Thalheim and mergify[bot]
d51114dc1b
document offline installation
2024-04-15 18:09:54 +00:00
Jörg Thalheim and mergify[bot]
93bf2c3d26
disko-install: simplify let statements
2024-04-15 18:03:33 +00:00
Jörg Thalheim and mergify[bot]
fbbac1aee6
disko-install: document --mode flag more
2024-04-05 13:54:19 +00:00
Jörg Thalheim and mergify[bot]
a6717b1afe
disko-install: check if it runs as root
2024-03-26 14:19:03 +00:00
Jörg Thalheim and Jörg Thalheim
fe064a6393
use nom-build if available
...
Nicer progress bars etc
2024-03-11 16:10:06 +01:00
Jörg Thalheim and Jörg Thalheim
a949edef70
accept relative paths for flakes in disko/disko-install
...
builtins.getFlake wants absolute paths
2024-03-11 16:10:06 +01:00
Jörg Thalheim and Jörg Thalheim
5866ae41f7
disko-install: fix case where lib in NixOS is not defined
...
This seems like a recent addition that we don't have on all NixOS machines.
2024-03-11 16:10:06 +01:00
Jörg Thalheim and Jörg Thalheim
7d25dc74c5
docs: clarify generated image names
2024-03-11 11:27:55 +01:00
Jörg Thalheim and Jörg Thalheim
714768a174
docs: expand diskoImagesScript example
2024-03-11 09:40:38 +01:00
Jörg Thalheim and mergify[bot]
72818e54ec
move disko-install into disko package
2024-03-09 07:05:35 +00:00
Jörg Thalheim and mergify[bot]
cf185d687f
disko-install: improve error message if disk is not passed
2024-03-05 14:03:10 +00:00