Fix Dhall escaping in nixos-modules/hardware

This commit is contained in:
Emery Hemingway 2022-10-20 17:09:43 -05:00
parent ce08351d4d
commit d75e71973e
1 changed files with 17 additions and 23 deletions

View File

@ -30,30 +30,24 @@ in {
usb_host_drv = cfg.usb.host.package;
};
ahciConfig = with cfg.ahci;
lib.optionalString enable ''
, ahci_drv = Some ${
toDhall {
binary = ahciEris.cap;
atapi = atapiSupport;
}
}
'';
usbConfig = lib.optionalString cfg.usb.enable ''
, usb_block_drv = Some { binary = ${usbEris.usb_block_drv.cap} }
, usb_host_drv = Some ${
with cfg.usb.host;
toDhall {
binary = usbEris.usb_host_drv.cap;
bios_handoff = biosHandoff;
ehci = ehciSupport;
ohci = ohciSupport;
uhci = uhciSupport;
xhci = xhciSupport;
}
ahciConfig = lib.optionalString cfg.ahci.enable (with cfg.ahci; ''
, ahci_drv = Some {
, binary = ${ahciEris.cap}
, atapi = ${toDhall atapiSupport}
}
'';
'');
usbConfig = lib.optionalString cfg.usb.enable (with cfg.usb.host; ''
, usb_block_drv = Some { binary = ${usbEris.usb_block_drv.cap} }
, usb_host_drv = Some {
, binary = ${usbEris.usb_host_drv.cap}
, bios_handoff = ${toDhall biosHandoff}
, ehci = ${toDhall ehciSupport}
, ohci = ${toDhall ohciSupport}
, uhci = ${toDhall uhciSupport}
, xhci = ${toDhall xhciSupport}
}
'');
managerConfig = pkgs.writeText "device_manager.dhall" ''
let Manager = ${pkgs.genodePackages.device_manager.dhall}/package.dhall