31 lines
626 B
Nix
31 lines
626 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib) mkEnableOption mkIf mkMerge mkOption types;
|
|
cfg = config.hardware.raspberry-pi."4".overlays.panel-uc;
|
|
in {
|
|
options.hardware.raspberry-pi."4".overlays.panel-uc = {
|
|
enable = mkEnableOption ''overlay enable'';
|
|
name = mkOption {
|
|
type = types.str;
|
|
default = "panel-uc";
|
|
};
|
|
};
|
|
|
|
config = mkMerge [
|
|
(mkIf cfg.enable {
|
|
hardware.deviceTree = {
|
|
overlays = [
|
|
{
|
|
name = "${cfg.name}";
|
|
filter = "bcm2711-rpi-cm4.dtb";
|
|
dtsFile = ./source/panel-uc.dts;
|
|
}
|
|
];
|
|
};
|
|
})
|
|
];
|
|
}
|