The image path is now set as an environment variable, so the script derivation could be reused. Also the installer derivation is created using writeShellApplication which will test against shellcheck.
Also added message on running the installer. The installer now only shows devices and the vendor/name, and doesn't include the partitions.
The installer also has proper confirmation prompts, and also warn the user if they are trying to install Ghaf on a removable device.
Description of changes
Use writeShellApplication for installer, specify runtimeInputs. Now script is always checked against shellcheck.
Installer improvements
Lists only actual devices, while partitions and loop devices are not shown. This uses hwinfo package.
Includes vendor and disk name of each drive (e.g. Sandisk Cruzer Force).
Installer verifies device user input, whether the device actually is valid.
Additionally confirms if the user is trying to install Ghaf on removable media.
Proper [y/N] prompts for each of the confirmations.
Shows error if not executed as root.
Image path given as environment variable, means the shell script doesn't have to always be rebuilt with disko image.
Changed hostname to be ghaf-installer.
Added getty help message on running ghaf-installer.
Checklist for things done
[x] Summary of the proposed changes in the PR description
[x] More detailed description in the commit message(s)
[x] Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
The image path is now set as an environment variable, so the script derivation could be reused. Also the installer derivation is created using
writeShellApplication
which will test against shellcheck.Also added message on running the installer. The installer now only shows devices and the vendor/name, and doesn't include the partitions.
The installer also has proper confirmation prompts, and also warn the user if they are trying to install Ghaf on a removable device.
Description of changes
writeShellApplication
for installer, specify runtimeInputs. Now script is always checked against shellcheck.hwinfo
package.[y/N]
prompts for each of the confirmations.ghaf-installer
.ghaf-installer
.Checklist for things done
x86_64
aarch64
riscv64
nix flake check --accept-flake-config
and it passesTesting