Commit Graph
38 Commits
Author SHA1 Message Date
Jörg Thalheim af087d076d disko: drop more eval warnings 2025-11-04 17:23:16 +00:00
Jörg Thalheim 3f65d72ca6 disko/tests: silence mdadm tests 2025-11-04 17:23:16 +00:00
Michael Hoang 67ff9807dd lib: fix mdadm warning when using config.system.build.installTest 2025-09-19 13:18:24 +00:00
DavHau ff2d853a84 treewide: format all files 2025-02-15 10:08:56 +00:00
Jörg Thalheim aa006252c8 add unmount feature 2024-11-29 14:44:15 +01:00
Michon van Dooren d192ffd944 Fix zpool create for disk vdev after mirror vdev
A config like

```nix
{
  vdev = [
    {
      mode = "mirror";
      members = [ "data1" "data2" ];
    }
    {
      members = [ "data3" ];
    }
  ];
}
```

would result in the following command:

```shell
zpool create -f <name> mirror /dev/data1 /dev/data2 /dev/data3
```

which would result in a single vdev with a 3-way mirror, rather than a
vdev with a 2-way mirror and a second vdev with a single disk. By
reordering the vdevs to handle those with an empty mode first we
transform this into:

```shell
zpool create -f <name> /dev/data3 mirror /dev/data1 /dev/data2
```

which does have the desired outcome.
2024-11-18 01:33:49 +01:00
Michon van Dooren 9b56c1afdb Add support for ZFS spare, log & dedup vdevs 2024-11-17 15:52:28 +01:00
Jörg Thalheim 6bfa3a18d4 tests/interactive-cryptsetup: make waiting for passphrase more robust 2024-11-08 11:07:09 +01:00
Felix Uhl 94bc0f5bb0 mode destroy: Add confirmation dialogue
The new confirmation dialogue is only shown for the new outputs
introduced in the previous commits. The existing outputs do not change
behavior to keep backwards compatibility.

Fixes #725
2024-11-06 21:16:18 +01:00
Felix Uhl daca7be309 outputs: make compatible with nix run and package lists
This adds new outpus like `format` and `formatNoDeps` which
are compatible with `nix run` so you can do something like

    nix run .#nixosConfigurations.myhostname.config.system.build.formatNoDeps

as originally intended in #78, or add disko to your configuration like

    environment.systemPackages = [
        config.system.build.format
        config.system.build.mount
        config.system.build.destroyFormatMount
    ];

as mentioned in #454.

Fixes part of #454
Supersedes #78

It also deprecates mode `disko` in favor of the clearer
`destroy,format,mount` and adds `format,mount` to allow easier in-place
updates.
2024-11-06 21:16:18 +01:00
Andrew Marshall 3979285062 treewide: Fix using pkgs.{build,host}Platform alias
This was recently changed in nixpkgs to be an alias; if nixpkgs is
configured to disable aliases, this usage will fail.
2024-10-29 09:32:41 +01: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 398acc470f update to new nixos test api 2024-06-07 14:20:40 +00:00
Qubasa 9f5d4e45cd nix fmt 2024-04-29 14:57:02 +00:00
lassulus f6b72bfed7 types *: make create idempotent 2024-03-13 09:58:33 +01:00
Jörg Thalheim 72818e54ec move disko-install into disko package 2024-03-09 07:05:35 +00:00
lassulus 3cb3775f9b lib/tests: use startCommand for create_machine 2024-03-04 01:51:42 +01:00
Jörg Thalheim 590245271a add assertion if mirroredBoots is used in vm test 2024-02-22 00:01:18 +00:00
Jörg Thalheim 9ab96378f8 reformat tree 2023-09-17 04:43:25 +00:00
Jörg Thalheim ecfb74e5cf remove another instance of hostId 2023-09-02 17:55:49 +00:00
Jörg Thalheim de50df482e do not set networking.hostId in vm tests by default
This will conflict with the user defaults otherwise
2023-09-02 14:16:18 +02:00
Jörg Thalheim 358b87fd44 make tests risv64 compatible 2023-08-13 18:30:15 +00:00
Jörg Thalheim 241c878d4b drop deprecated boot.initrd.services.swraid.enable option 2023-08-11 08:45:46 +00:00
Jörg Thalheim b32f0e2876 apply treefmt 2023-08-11 08:45:46 +00:00
lassulus 491e567d47 tests: enable swraid, add luks-on-mdadm test 2023-08-10 11:03:58 +00:00
lassulus 0e40d07f86 lib/tests: cleanup 2023-07-28 12:43:42 +00:00
lassulus 0d2ae00b00 testLib.makeDiskoTest: remove base & minimal profile 2023-07-28 12:43:42 +00:00
lassulus 7a37b47634 lib makeDiskoTest: create -> format 2023-07-21 14:25:51 +02:00
lassulus 737a21794c lib makeDiskoTest: set networking.hostId to non null value 2023-07-20 21:51:54 +02:00
lassulus 1ddcff717c module: pass makeTest and eval-config to diskoLib 2023-07-20 21:32:53 +02:00
lassulus 2800cf502a tests cli: use direct mode 2023-07-20 19:17:11 +02:00
lassulus 2b728ffe02 libTests prepareDisks: set grub.devices to nodev if empty 2023-07-20 19:03:26 +02:00
lassulus 4df1400b38 makeDiskoTest: remove deprecated grub-devices 2023-07-20 18:31:53 +02:00
lassulus fc98920ef5 lib makeDiskoTest: use systemd-boot if efi is enabled 2023-07-20 18:31:17 +02:00
lassulus 815d018e2f lib makeDiskoTest: allow passing of extendModules 2023-07-20 18:30:55 +02:00
lassulus 04452cfd2b tests: refactor to not use args and to use gpt type 2023-07-19 19:07:40 +00:00
lassulus 715c211dd7 testLib.makeDiskoTest: split extraConfig into nixos-config, extraSystemConfig & extraInstallerConfig 2023-07-19 19:07:40 +00:00
lassulus 056637d3c9 move tests/lib.nix into diskoLib.testLib 2023-07-19 19:07:40 +00:00