mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-27 01:44:41 +03:00
c1acf97334
Since the initial implementation I learned enough to know where it was slighly wrong. I think this fixes most of the slight wrongness.
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
||
|
||
with lib;
|
||
|
||
let
|
||
cfg = config.mobile.hardware.socs;
|
||
in
|
||
{
|
||
options.mobile = {
|
||
hardware.socs.qualcomm-apq8064-1aa.enable = mkOption {
|
||
type = types.bool;
|
||
default = false;
|
||
description = "enable when SOC is APQ8064–1AA";
|
||
};
|
||
hardware.socs.qualcomm-msm8953.enable = mkOption {
|
||
type = types.bool;
|
||
default = false;
|
||
description = "enable when SOC is msm8953";
|
||
};
|
||
hardware.socs.qualcomm-msm8939.enable = mkOption {
|
||
type = types.bool;
|
||
default = false;
|
||
description = "enable when SOC is msm8939";
|
||
};
|
||
};
|
||
|
||
config = mkMerge [
|
||
{
|
||
mobile = mkIf cfg.qualcomm-msm8939.enable {
|
||
system.system = "aarch64-linux";
|
||
quirks.qualcomm.msm-fb-handle.enable = true;
|
||
};
|
||
}
|
||
{
|
||
mobile = mkIf cfg.qualcomm-msm8953.enable {
|
||
system.system = "aarch64-linux";
|
||
quirks.qualcomm.msm-fb-handle.enable = true;
|
||
};
|
||
}
|
||
{
|
||
mobile = mkIf cfg.qualcomm-apq8064-1aa.enable {
|
||
system.system = "armv7l-linux";
|
||
quirks.qualcomm.msm-fb-refresher.enable = true;
|
||
};
|
||
}
|
||
];
|
||
}
|