So I’m doing a little NixOS test and I’d like it to have internet connection (I know this is not a good practice but this is just for testing my way around). I’ve read here that you just have to disable the nix sandbox. So I put
nix.useSandbox = false;
However, this is not doing it, my simple command
[status, out] = machine.execute("ping -c1 google.com") print(out)
Is giving me
machine # ping: google.com: Name or service not known
Am I missing something?
As an aside, It may be wrong to hijack my own question like this but I feel it’s wronger to open a new one just for this: How would I use
shell_interact() when launching the test from a flake?
I run my test from a flake output as
nix build .#nixosTests.test -L but then a
shell_interact() gives me
machine: Terminal is ready (there is no prompt):