oom-hardware/raspberry-pi/overlays/dtb-vc4-fkms-v3d.nix
2024-11-29 15:27:21 +01:00

31 lines
640 B
Nix

{
config,
lib,
...
}: let
inherit (lib) mkEnableOption mkIf mkMerge mkOption types;
cfg = config.hardware.raspberry-pi."4".overlays.vc4-fkms-v3d;
in {
options.hardware.raspberry-pi."4".overlays.vc4-fkms-v3d = {
enable = mkEnableOption ''overlay enable'';
name = mkOption {
type = types.str;
default = "vc4-fkms-v3d";
};
};
config = mkMerge [
(mkIf cfg.enable {
hardware.deviceTree = {
overlays = [
{
name = "${cfg.name}";
filter = "bcm2711-rpi-*.dtb";
dtsFile = ./source/vc4-fkms-v3d.dts;
}
];
};
})
];
}