1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 03:32:02 +03:00
mobile-nixos/modules/hardware-mediatek.nix
2020-06-28 23:54:14 -04:00

35 lines
798 B
Nix

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