diff --git a/modules/nixos/hardware/raspberry-pi/default.nix b/modules/nixos/hardware/raspberry-pi/default.nix index c88f39e..605368d 100644 --- a/modules/nixos/hardware/raspberry-pi/default.nix +++ b/modules/nixos/hardware/raspberry-pi/default.nix @@ -233,7 +233,6 @@ in ./audio.nix ./bluetooth.nix ./config.nix - ./overlays ./i2c.nix ./leds.nix ./modesetting.nix diff --git a/modules/nixos/hardware/raspberry-pi/overlays/default.nix b/modules/nixos/hardware/raspberry-pi/overlays/default.nix index 6e332e9..b72dbfc 100644 --- a/modules/nixos/hardware/raspberry-pi/overlays/default.nix +++ b/modules/nixos/hardware/raspberry-pi/overlays/default.nix @@ -10,32 +10,32 @@ in options.${namespace}.hardware.raspberry-pi.overlays = with lib; { pi5DisableWifi = { enable = lib.mkEnableOption "Disable wifi on Pi5"; - overlay = mkOpt types.str "${firmware}/boot/overlays/disable-wifi-pi5.dtbo" "Location of the dtbo file"; + overlay = mkOpt types.str "${firmware}/share/raspberrypi/boot/overlays/disable-wifi-pi5.dtbo" "Location of the dtbo file"; }; pi5DisableBluetooth = { enable = lib.mkEnableOption "Disable bluetooth on Pi5"; - overlay = mkOpt types.str "${firmware}/boot/overlays/disable-bt-pi5.dtbo" "Location of the dtbo file"; + overlay = mkOpt types.str "${firmware}/share/raspberrypi/boot/overlays/disable-bt-pi5.dtbo" "Location of the dtbo file"; }; pi5i2c0 = { enable = lib.mkEnableOption "Disable pi5i2c0 on Pi5"; - overlay = mkOpt types.str "${firmware}/boot/overlays/i2c0-pi5.dtbo" "Location of the dtbo file"; + overlay = mkOpt types.str "${firmware}/share/raspberrypi/boot/overlays/i2c0-pi5.dtbo" "Location of the dtbo file"; }; pi5i2c1 = { enable = lib.mkEnableOption "Disable pi5i2c1 on Pi5"; - overlay = mkOpt types.str "${firmware}/boot/overlays/i2c1-pi5.dtbo" "Location of the dtbo file"; + overlay = mkOpt types.str "${firmware}/share/raspberrypi/boot/overlays/i2c1-pi5.dtbo" "Location of the dtbo file"; }; pi5i2c2 = { enable = lib.mkEnableOption "Disable pi5i2c2 on Pi5"; - overlay = mkOpt types.str "${firmware}/boot/overlays/i2c2-pi5.dtbo" "Location of the dtbo file"; + overlay = mkOpt types.str "${firmware}/share/raspberrypi/boot/overlays/i2c2-pi5.dtbo" "Location of the dtbo file"; }; pi5i2c3 = { enable = lib.mkEnableOption "Disable pi5i2c3 on Pi5"; - overlay = mkOpt types.str "${firmware}/boot/overlays/i2c3-pi5.dtbo" "Location of the dtbo file"; + overlay = mkOpt types.str "${firmware}/share/raspberrypi/boot/overlays/i2c3-pi5.dtbo" "Location of the dtbo file"; }; }; @@ -80,32 +80,32 @@ in echo "Applying Device Tree Overlays via ConfigFS" if [ ${if cfg.pi5DisableWifi.enable then "true" else "false"} ]; then - mkdir ${toString configfsPath}/disable-wifi-pi5 + mkdir -p ${toString configfsPath}/disable-wifi-pi5 cp ${cfg.pi5DisableWifi.overlay} ${configfsPath}/disable-wifi-pi5/dtbo fi if [ ${if cfg.pi5DisableBluetooth.enable then "true" else "false"} ]; then - mkdir ${toString configfsPath}/disable-bt-pi5 + mkdir -p ${toString configfsPath}/disable-bt-pi5 cp ${cfg.pi5DisableBluetooth.overlay} ${configfsPath}/disable-bt-pi5/dtbo fi if [ ${if cfg.pi5i2c0.enable then "true" else "false"} ]; then - mkdir ${toString configfsPath}/i2c0-pi5 + mkdir -p ${toString configfsPath}/i2c0-pi5 cp ${cfg.pi5i2c0.overlay} ${configfsPath}/i2c0-pi5/dtbo fi if [ ${if cfg.pi5i2c1.enable then "true" else "false"} ]; then - mkdir ${toString configfsPath}/i2c1-pi5 + mkdir -p ${toString configfsPath}/i2c1-pi5 cp ${cfg.pi5i2c1.overlay} ${configfsPath}/i2c1-pi5/dtbo fi if [ ${if cfg.pi5i2c2.enable then "true" else "false"} ]; then - mkdir ${toString configfsPath}/i2c2-pi5 + mkdir -p ${toString configfsPath}/i2c2-pi5 cp ${cfg.pi5i2c2.overlay} ${configfsPath}/i2c2-pi5/dtbo fi if [ ${if cfg.pi5i2c3.enable then "true" else "false"} ]; then - mkdir ${toString configfsPath}/i2c3-pi5 + mkdir -p ${toString configfsPath}/i2c3-pi5 cp ${cfg.pi5i2c3.overlay} ${configfsPath}/i2c3-pi5/dtbo fi '';