nixops
nixops copied to clipboard
on OSX "(stdenv).isLinux failed" despite having localSystem set
Using current nixops master
branch to deploy configuration to an EC2 Nixos instance, I have the following nixops config:
{ webserver = { config, pkgs, lib, ... }:
{ nixpkgs.localSystem.system = "x86_64-linux";
deployment.targetHost = "10.0.4.96";
};
network.description = "Test";
}
When I run nixops deploy
I get
error: assertion (stdenv).isLinux failed at /nix/store/wffb1cv7pkc6nvgclndivs20xiq563g6-nixpkgs-20.09.2338.3d2d8f281a2/nixpkgs/pkgs/os-specific/linux/kernel/generic.nix:66:1
(use '--show-trace' to show detailed location information)
while building all machine configurations...
I have a remote builder that works and I can build x86_64-linux
things. What am I doing wrong?
Seems to be related to https://github.com/NixOS/nixops/issues/560
Additionally if I add --option system x86_64-linux
I can get much further (having internet issues so I'm not sure how far yet) however https://github.com/NixOS/nixops/issues/560#issuecomment-403224195 says you should not use this option. I'm not quite sure why.
so, adding --option system x86_64-linux
almost works. It will try to do some builds on the machine it is supposed to be deploying to but these fail for some reason (presumably because this machine is not set up as a remote builder). If I take the derivation that failed and nix-build /nix/store/thederivation.drv
then it will successfully build it on the proper remote builder that I have set up. I can then do nixops deploy --option system x86_64-linux
which will work because everything is in my local nix store now.
So the new question is, why is nixops trying to build things on the target machine rather than my remote builder?