nixops-aws icon indicating copy to clipboard operation
nixops-aws copied to clipboard

[flakes] NIX_PATH impurity

Open roberth opened this issue 3 years ago • 1 comments

Running

$ NIX_PATH= nixops deploy -d nixops-example-dummy --build-only

I get error: file 'nixpkgs/nixos/modules/virtualisation/ec2-amis.nix' was not found in the Nix search path (add it using $NIX_PATH or -I), even without actually using nixops-aws; module system import resolution must be able to get all imports.

This is an impurity, which is a bug since flakes. It should be taken from network.nixpkgs instead.

roberth avatar Aug 25 '21 19:08 roberth

I had this problem too, fixed it like this:

  1. https://github.com/Uthar/nixops/commit/eff444990351b462e4ba22a1d2d8ffd241cd2e2c
  2. https://github.com/Uthar/nixops-aws/commit/c14964982f5130241b0e51ed87cf823721bac804

https://github.com/Uthar/nixops-aws/commit/c14964982f5130241b0e51ed87cf823721bac804#diff-41b598abd0ad034083691ba71cbf1a0280064be95e76e0a43b0d9df7664cdfff is still hardcoded against <nixpkgs> though, but in my case it was fine

Uthar avatar Sep 12 '21 11:09 Uthar