Fixes#871
Previously, if a user used v2.10.0 (currently unreleased master), an
error like this would be displayed:
error: attribute '_cliDestroyFormatMount' missing
at /nix/store/fbqgaij9d3b373rq1iav5glzr4dy77qf-disko/share/disko/cli.nix:73:7:
72| else if (lib.traceValSeq hasDiskoModuleFlake) then
73| (builtins.getFlake flake).nixosConfigurations.${flakeAttr}.config.system.build.${diskoAttr}
| ^
74| else
This situation now produces a more helpful error:
Error: Attribute `nixosConfigurations.testmachine.config.system.build._cliDestroyFormatMount`
not found in flake `/home/felix/repos-new/disko`!
This is probably caused by the locked version of disko in the flake
being different from the version of disko you executed.
EITHER set the `disko` input of your flake to `github:nix-community/disko/latest`,
run `nix flake update disko` in the flake directory and then try again,
OR run `nix run github:nix-community/disko/v1.9.0 -- --help` and use one of its modes.
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.
Apply standard formatting and some statix conventions using;
```sh
nixpkgs-fmt **.nix && statix fix .
```
With the intent of making contribution a bit easier and reducing mental
load in hand formatting (in the same vein as [black]).
[black]: https://github.com/psf/black#the-uncompromising-code-formatter