modules/system-types: Default to `none` when Mobile NixOS config is disabled
This is used to facilitate inclusion of the Mobile NixOS machinery in a
NixOS config, but opting-in into only a few components (e.g. stage-1)
@@ -49,5 +49,12 @@ in
message = "Cannot build unexpected system type: ${system_type}.\n Known types: ${lib.concatStringsSep ", " known_system_types}";
}
];
+
+ # When evaluating with the Mobile NixOS defaults disabled, we want
+ # to use the `none` type so evaluation can continue.
+ # Otherwise we want to error on an unset value if not set.
+ mobile.system.type = mkIf (!config.mobile.enable) (
+ lib.mkOptionDefault "none"
+ );
};
}
