File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
reference/hardware/demo-tower Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 2828 config = {
2929 ghaf . qemu . guivm = optionalAttrs ( hasAttr "hardware" config . ghaf ) {
3030 microvm . qemu . extraArgs =
31- [
31+ optionals ( config . ghaf . hardware . definition . type == "laptop" ) [
3232 # Button
33- # "-device"
34- # "button"
33+ "-device"
34+ "button"
3535 # Battery
36- # "-device"
37- # "battery"
36+ "-device"
37+ "battery"
3838 # AC adapter
39- # "-device"
40- # "acad"
39+ "-device"
40+ "acad"
4141 ]
4242 ++ optionals ( hasAttr "yubikey" config . ghaf . hardware . usb . external . qemuExtraArgs ) config . ghaf . hardware . usb . external . qemuExtraArgs . yubikey
4343 ++ optionals ( hasAttr "msKBD" config . ghaf . hardware . usb . external . qemuExtraArgs ) config . ghaf . hardware . usb . external . qemuExtraArgs . msKBD
Original file line number Diff line number Diff line change 172172 default = [ ] ;
173173 } ;
174174
175+ type = mkOption {
176+ description = "Type of hardware (laptop, desktop, server)" ;
177+ type = types . str ;
178+ default = "laptop" ;
179+ } ;
180+
175181 host = {
176182 kernelConfig = mkOption {
177183 description = "Host kernel configuration" ;
Original file line number Diff line number Diff line change 77 # List of system SKUs covered by this configuration
88 skus = [ "Be Quiet mk1" ] ;
99
10+ type = "desktop" ;
11+
1012 # Host configuration xhci_pci was blacklisted
1113 host = {
1214 kernelConfig . kernelParams = [
You can’t perform that action at this time.
0 commit comments