Open coretemp opened 5 years ago
Are you setting the configuration option nixpkgs.system = "x86_64-linux"? Are you ever importing <nixpkgs>
directly?
No, for the first question in the deployed configurations.
I do have lines of the form foo = import <nixpkgs {};
, if that answers your second question.
In your case (and mine!), evaluation happens on darwin and the build happens on linux. That assertion that's failing in /nix/store/n3k7w0vjbwhnnzsmnl6blh3r83gciabq-source/pkgs/os-specific/linux/kernel/generic.nix:51:1
means that you didn't tell nixpkgs what system it should build for, and so it assumed the evaluation host (darwin).
To fix this, pass in localSystem.system = "x86_64-linux";
to any manually-imported <nixpkgs>
spots, and set the nixpkgs.localSystem
NixOS option in your machine's configuration to the same.
Please clarify the part of your sentence with "your machine's configuration". My current way of reading this is, that it's about the machines being deployed.
Your machine's configuration = the NixOS configuration for the machine that you're specifying in NixOps.
Is there any way I can get the line number of the import <nixpkgs> {}
that causes this?
(I consider getting an answer to this question less important. )
@ledettwy I made some progress, but now I hit the following:
This was a change that was put in place to have a recent version of Nix in place. I would like to continue to use an arbitrary version of Nix as opposed to only released versions for flexibility.
a 'x86_64-linux' is required to build '/nix/store/i5ssk4caj5gzyqgx5ap4g79pihlscapd-source.drv', but I am a 'x86_64-darwin'
The line it refers to is the one defining the nix
attribute.
tools.nix:
{ rev, sha256 }:
let bootstrap = import <nixpkgs> { localSystem.system = "x86_64-linux";};
in
bootstrap.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
inherit rev sha256;
}
{ config, lib, pkgs, ... }:
let
recent_nixpkgs = (import ./tools.nix)
{rev = "dd57a1fd402125727eaa88019b70bfb82851b05a";
sha256 = "0kmbslgrwb66mjmssphajd4ipx0hwhggs3qnrc7d4nhq0n77zpw6";
};
nixpkgs_with_nix_2dot1 = import recent_nixpkgs { localSystem.system = "x86_64-linux";};
in
{
options = {};
config = {
nixpkgs.localSystem.system = "x86_64-linux";
nixpkgs.config.packageOverrides = pkgs: {
nix = nixpkgs_with_nix_2dot1.nixUnstable.overrideAttrs (oldAttrs: {
src = nixpkgs_with_nix_2dot1.fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "2ca6ef0fec150209994814fada3533fbd0f9f764";
sha256 = "0yfs17f0gac2yzrz4zkkwh132lbwkyzg60dxyx44bzqynh2ibky0";
};
});};
};
}
This is only a problem with libvirt. You have not shown your deployment description, but I suspect that is the culprit. If you change the deployment target to, say, VirtualBox, it will, most likely, work.
NixOS/nixpkgs#73470
It is not possible to use NixOps (
master
) on Mac OS X to deploy something complex.It's due to (see below for full log):
The manual says
I don't think the manual is accurate given the above.