nixpkgs/nixos
John Ericson 9f9723b179 nixpkgs module: Fix defaulting of localSystem and system
Take two of #40708 (4fe2898608).

That PR attempted to bidirectionally default `config.nixpkgs.system` and
`config.nixpkgs.localSystem.system` to each be updated by the other. But
this is not possible with the way the module system works. Divergence in
certain cases in inevitable.

This PR is more conservative and just has `system` default `localSystem`
and `localSystem` make the final call as-is. This solves a number of
issues.

 - `localSystem` completely overrides `system`, just like with nixpkgs
 proper. There is no need to specify `localSystem.system` to clobber the
 old system.

 - `config.nixpkgs.localSystem` is exactly what is passed to nixpkgs. No
 spooky steps.

 - `config.nixpkgs.localSystem` is elaborated just as nixpkgs would so
 that all attributes are available, not just the ones the user
 specified.

The remaining issue is just that `config.nixpkgs.system` doesn't update
based on `config.nixpkgs.localSystem.system`. It should never be
referred to lest it is a bogus stale value because
`config.nixpkgs.localSystem` overwrites it.

Fixes #46320
2018-09-07 16:43:56 -04:00
..
doc doc: Add changelog entry for new definition of system and stdenv.system 2018-09-06 09:24:08 -04:00
lib nixpkgs module: Fix defaulting of localSystem and system 2018-09-07 16:43:56 -04:00
maintainers create-amis.sh: Change directory for AMIs 2018-07-24 21:19:14 +02:00
modules nixpkgs module: Fix defaulting of localSystem and system 2018-09-07 16:43:56 -04:00
tests Merge pull request #45912 from xeji/p/dhcpcd 2018-09-02 15:28:15 -04:00
COPYING
default.nix
README
release-combined.nix nixos/release-combined: remove keymap tests from tested job 2018-06-06 21:02:55 +02:00
release-small.nix
release.nix nixos/release.nix: disable blivet test (#45931) 2018-09-02 09:37:48 +02:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.