mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 11:03:37 +03:00
35 lines
798 B
Nix
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";
|
|
};
|
|
}
|
|
];
|
|
}
|