mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-13 12:35:48 +03:00
35 lines
770 B
Nix
35 lines
770 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) mkIf mkMerge mkOption types;
|
|
inherit (pkgs) imageBuilder;
|
|
cfg = config.mobile.hardware.socs;
|
|
in
|
|
{
|
|
options.mobile = {
|
|
hardware.socs.allwinner-a64.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = lib.mdDoc "enable when SOC is Allwinner A64";
|
|
};
|
|
hardware.socs.allwinner-r18.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = lib.mdDoc "enable when SOC is Allwinner-R18";
|
|
};
|
|
};
|
|
|
|
config = mkMerge [
|
|
{
|
|
mobile = mkIf cfg.allwinner-a64.enable {
|
|
system.system = "aarch64-linux";
|
|
};
|
|
}
|
|
{
|
|
mobile = mkIf cfg.allwinner-r18.enable {
|
|
system.system = "aarch64-linux";
|
|
};
|
|
}
|
|
];
|
|
}
|