diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-03-21 23:23:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-21 23:23:24 -0400 |
commit | 9d8d66baf56210604cb78c2bc717e717be386812 (patch) | |
tree | 5b75a358b77fe9b2b86cc523b181b374150fa883 /nixos/modules | |
parent | 6b95893a6dc9f74ab66536b16ebfa40988d64e0c (diff) | |
download | nixlib-9d8d66baf56210604cb78c2bc717e717be386812.tar nixlib-9d8d66baf56210604cb78c2bc717e717be386812.tar.gz nixlib-9d8d66baf56210604cb78c2bc717e717be386812.tar.bz2 nixlib-9d8d66baf56210604cb78c2bc717e717be386812.tar.lz nixlib-9d8d66baf56210604cb78c2bc717e717be386812.tar.xz nixlib-9d8d66baf56210604cb78c2bc717e717be386812.tar.zst nixlib-9d8d66baf56210604cb78c2bc717e717be386812.zip |
nixos/nixpkgs.nix: Allow just using config in system (#80818)
* nixos/nixpkgs.nix: Allow just using config in system This assertion requires system to work properly. We might not have this in cases where the user just sets config and wants Nixpkgs to infer system from that. This adds a default for when this happens, using doubleFromSystem. * parens
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/misc/nixpkgs.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index 011d493c1538..4f5a9250eaae 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -236,8 +236,8 @@ in let nixosExpectedSystem = if config.nixpkgs.crossSystem != null - then config.nixpkgs.crossSystem.system - else config.nixpkgs.localSystem.system; + then config.nixpkgs.crossSystem.system or (lib.systems.parse.doubleFromSystem (lib.systems.parse.mkSystemFromString config.nixpkgs.crossSystem.config)) + else config.nixpkgs.localSystem.system or (lib.systems.parse.doubleFromSystem (lib.systems.parse.mkSystemFromString config.nixpkgs.localSystem.config)); nixosOption = if config.nixpkgs.crossSystem != null then "nixpkgs.crossSystem" |