disko
disko copied to clipboard
examples without hard-coded devices
The entire examples directory needs to ship without hard-coded devices. To simply follow what's in the quickstart: https://github.com/nix-community/disko/blob/master/docs/quickstart.md#step-4-copy-the-disk-configuration-to-your-machine
$ cd /tmp
$ curl https://raw.githubusercontent.com/nix-community/disko/master/example/hybrid.nix -o disko-config.nix
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 834 100 834 0 0 2322 0 --:--:-- --:--:-- --:--:-- 2323
$ sudo nix --extra-experimental-features 'nix-command flakes' run github:nix-community/disko -- --mode disko /tmp/disko-config.nix --arg disks '[ "/dev/nvme0n1" ]'
...
Problem opening /dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAGB12345 for reading! Error is 2
This changed in https://github.com/nix-community/disko/commit/04452cfd2bafc8f7158f88de3b7de011a754b608 (by @lassulus), it looks like the intent was to clean up some tests? Unfortunately quickstart got missed in that change.
This could be resolved by either adding dynamic arguments back to the examples (i.e. revert 04452cfd2bafc8f7158f88de3b7de011a754b608) OR by updating the docs to indicate users should plug their own disk IDs into their /tmp/disko-config.nix instead of passing --arg disks on the command line.