diff --git a/nixos-modules/hardware/default.nix b/nixos-modules/hardware/default.nix index 4439e3d..62b0ae6 100644 --- a/nixos-modules/hardware/default.nix +++ b/nixos-modules/hardware/default.nix @@ -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