nixpkgs/nixos/modules
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
..
config Added an example for environment.variable. (#45956) 2018-09-02 21:21:14 +02:00
hardware [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
i18n/input-method nixos docs: more IDs 2018-09-02 15:47:59 -04:00
installer nixos-generate-config.pl: remove executable bit 2018-09-01 21:29:30 +02:00
misc nixpkgs module: Fix defaulting of localSystem and system 2018-09-07 16:43:56 -04:00
profiles usb-storage -> uas 2018-08-23 01:42:34 +00:00
programs nixos docs: give IDs to things 2018-09-01 16:20:49 -04:00
security nixos docs: give IDs to things 2018-09-01 16:20:49 -04:00
services nixos docs: more IDs 2018-09-02 15:56:24 -04:00
system Merge pull request #44526 from samueldr/feature/actiavation-failure-identification 2018-09-02 14:28:10 -04:00
tasks Merge pull request #44347 from zhangyoufu/patch-28620 2018-09-01 21:28:31 -04:00
testing nixos/tests: Set DefaultTimeoutStartSec very high (#44916) 2018-08-29 12:12:12 +02:00
virtualisation reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
module-list.nix nixos/zeronet: init (#44842) 2018-08-31 11:40:23 +01:00
rename.nix virtualization.growPartition -> virtualisation.growPartition 2018-08-28 14:24:39 +02:00