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.
This commit is contained in:
Felix Uhl
2024-11-06 21:16:18 +01:00
parent 856a290215
commit daca7be309
9 changed files with 123 additions and 33 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ a disk named /dev/sda, you would run the following command to partition, format
and mount the disk.
```console
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode disko /tmp/disk-config.nix
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disk-config.nix
```
## Related Tools