disko icon indicating copy to clipboard operation
disko copied to clipboard

examples without hard-coded devices

Open jpds opened this issue 2 years ago • 1 comments

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

jpds avatar Oct 22 '23 12:10 jpds

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.

MattSturgeon avatar Oct 25 '23 11:10 MattSturgeon