Hi everyone! I’m new to Nix OS so this might be a dumb question but I can’t find anyone talking about this either…
Brief:
I built a nixos amazonImage using nix-build, uploaded to aws S3 storage and tried to launch it. EC2 told me “ClientError: Unable to find an etc directory with fstab”
Details:
I built an image using this command inside nixpkgs directory: nix-build -A amazonImage.x86_64-linux nixos/release.nix
The resultant files were stored in the result directory: nixos-amazon-image-20.03pre130979.gfedcba-x86_64-linux.vhd
I uploaded the file to S3 storage and I’ve setup the service role vmimport so I can launch it using aws import-image command.
After launching it, an error occured saying “ClientError: Unable to find an etc directory with fstab”
Relevant Files
The release.nix I used is identical to this:
The amazon-image.nix I used is identical to this:
Relevant Discussion but no solution
Some other devs(?) also had this issue back in may 2019 and they didnt seem to solve it either.
** Other Questions **
Do you nix-build amazonImage.x86_64-linux or ova.x86_64-linux or anyother image format for aws ec2?