hardware: Add generic ARM platforms
Will be used by the release.nix configurations. Though these may be just
as useful as the x86_64 one is!
{ config, lib, pkgs, ... }:
-with lib;
-
let
+ inherit (lib) mkIf mkMerge mkOption types;
cfg = config.mobile.hardware.socs;
in
{
- options.mobile = {
- hardware.socs.generic-x86_64.enable = mkOption {
+ options.mobile.hardware.socs = {
+ # Please don't use `generic-*` SoCs in specific devices.
+ generic-x86_64.enable = mkOption {
type = types.bool;
default = false;
description = "Enable when system is a generic x86_64";
+ internal = true;
+ };
+ generic-aarch64.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable when system is a generic AArch64";
+ internal = true;
+ };
+ generic-armv7l.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable when system is a generic armv7l";
+ internal = true;
};
};
config = {
- mobile.system.system = lib.mkIf cfg.generic-x86_64.enable "x86_64-linux";
+ mobile.system.system = mkMerge [
+ (lib.mkIf cfg.generic-x86_64.enable "x86_64-linux")
+ (lib.mkIf cfg.generic-armv7l.enable "armv7l-linux")
+ (lib.mkIf cfg.generic-aarch64.enable "aarch64-linux")
+ ];
};
}
