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
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user