[Nix-dev] nixops: Deploying from macOS

Kirill Elagin kirelagin at gmail.com
Sun May 28 07:34:56 CEST 2017


On Sun, May 28, 2017 at 1:48 AM Daiderd Jordan <daiderd at gmail.com> wrote:

> 1. Things like writeText use the stdenv so the inputs differ depending on
> the platform, resulting in a different output. Even tho the resulting files
> would be identical.
>

Would it be feasible to make sure that trivial builders (at least the most
trivial of them) do not depend on `stdenv`? This probably goes against the
spirit of Nix, but this would relieve the pain of building remote systems
as, I suppose, most of the time all the “real” derivations will be
available from the cache, and the ones that are actually built are configs.


> 2. Yes, if the nix-daemon is used the NIX_BUILD_HOOK and
> NIX_REMOTE_SYSTEMS will be determined by the daemon process.
> This means that nixops can't configure it dynamically to build using the
> vm.
>
> I don't think there's a solution for this at the moment, except for
> configuring distributed builds on your nixops host.
>

Can we provide an “official” configuration for a satelite builder such that
it will be possible to deploy one using nixops right away as a “bootstrap”?
I mean, the configuration has to be completely deterministic and fixed, so
that Hydra will build everything, including configs, and nixops will be
able to fetch everything it needs to deploy the machine from the cache.


>
>
> On 26 May 2017 at 12:39:22, Kirill Elagin (kirelagin at gmail.com) wrote:
>
> Hi,
>
> I have finally switched my laptop to using nix-daemon and got bitten by
> https://github.com/NixOS/nixops/issues/260 (and/or
> https://github.com/NixOS/nixops/issues/483).
>
> To be honest, I am completely lost. Could someone please explain to me
> what is going on here?
>
> 1. The error that I get is this one:
>
> > error: a ‘x86_64-linux’ is required to build
> ‘/nix/store/cm2y0hlgv6dpcyzf022ih1b0qwh3x5n7-etc-logind.conf.drv’, but I am
> a ‘x86_64-darwin’
>
> Why on Earth is Linux needed to build _config files_? Building configs is
> mostly echoing, right? Who exactly tells nix that `environment.etc` files
> require a certain platform to be built? Maybe we could fix that?
>
> 2. How is this all related to nix-daemon? `nixops/deployment.py` checks
> for `os.environ.get('NIX_REMOTE') != 'daemon'`, why does it do this? Is
> that because `NIX_BUILD_HOOK` does not work when using nix-daemon? What’s
> that whole story with `NIX_REMOTE_SYSTEMS` and ssh keys really about? Why
> are there no issues with ssh keys when we I do not use nix-daemon? Why
> copying something manually helps?
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170528/31ee9ac7/attachment.html>


More information about the nix-dev mailing list