Next, I’ve figured out how to install nixops2: nix-env -i nixops-with-plugins will install v2.0.0 (at time of writing) nix-env -i nixops will install v1.7 (at time of writing)
edit: Nixops2 will revert nix from v2.6.0 to v2.4 on install, so I ran nix upgrade-nix to get back to v2.6.0.
Now, my current nixops.nix with the added network.storage.legacy = {}; gives the error: Exception: could not find specified deployment in state file ‘/tmp/tmp88u3n4lknixops/state.nixops’ I’m not sure why it would look in a tmp directory? Do I perhaps have to explicitly provide the location of the default legacy SQLite database?
Simply chaning it to network.storage.memory = {}; seems to work without error.
Unfortunately I run into another error when using flake.nix:
nixops deploy
error: flake 'path:/workspaces/deployments/local-vms' requires lock file changes but they're not allowed due to '--no-update-lock-file'
nixops deploy --recreate-lock-file
usage: nixops [-h] [--version] [--pdb] operation ...
nixops: error: unrecognized arguments: --recreate-lock-file