1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-14 18:21:41 +03:00
mobile-nixos/modules/hardware-generic.nix
Samuel Dionne-Riel 987be3bf59 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!
2020-03-13 14:56:21 -04:00

38 lines
1001 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkOption types;
cfg = config.mobile.hardware.socs;
in
{
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 = 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")
];
};
}