oom-hardware/uconsole/overlays/dtb-disable-genet.nix
2024-10-17 15:00:31 +02:00

31 lines
646 B
Nix

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