1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00
mobile-nixos/modules/hardware-mediatek.nix

35 lines
798 B
Nix
Raw Normal View History

2020-06-25 00:42:47 +03:00
{ config, lib, pkgs, ... }:
let
inherit (lib) mkOption mkMerge mkIf types;
cfg = config.mobile.hardware.socs;
in
{
options.mobile = {
2020-06-29 05:44:21 +03:00
hardware.socs.mediatek-mt6755.enable = mkOption {
type = types.bool;
default = false;
description = "enable when SOC is Mediatek MT6755 (Helio P10)";
};
2020-06-25 00:42:47 +03:00
hardware.socs.mediatek-mt6785.enable = mkOption {
type = types.bool;
default = false;
description = "enable when SOC is Mediatek MT6785 (Helio G90)";
};
};
config = mkMerge [
2020-06-29 05:44:21 +03:00
{
mobile = mkIf cfg.mediatek-mt6755.enable {
system.system = "aarch64-linux";
quirks.fb-refresher.enable = true;
};
}
2020-06-25 00:42:47 +03:00
{
mobile = mkIf cfg.mediatek-mt6785.enable {
system.system = "aarch64-linux";
};
}
];
}