This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| pkgs = import <nixpkgs> { | |
| crossSystem = (import <nixpkgs/lib>).systems.examples.aarch64-multiplatform; | |
| }; | |
| in | |
| pkgs.mkShell rec { | |
| depsBuildBuild = [ pkgs.buildPackages.stdenv.cc ]; | |
| nativeBuildInputs = with pkgs.buildPackages; [ | |
| bison | |
| bc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a1: a2: | |
| let | |
| lib = (import <nixpkgs> {}).lib; | |
| xor = a: b: (a && !b) || (!a && b); | |
| subtractAttrs = a: b: with lib; | |
| let | |
| attrsAttrsNames = x: filter (e: (isAttrs x.${e})) (attrNames x); | |
| bothAttrs = intersectLists (attrsAttrsNames a) (attrsAttrsNames b); | |
| in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| services.vfio-vm = { | |
| enable = true; | |
| pciIDs = [ "1002:67b0" "1002:aac8" "104c:8241"]; | |
| isolcpus = [ 1 2 5 6 ]; # core 2&3 + corresponding hyperthreads | |
| hugePageSize = "1G"; | |
| hugePageCount = 20; | |
| inputDevices = [ | |
| "/dev/input/by-id/usb-Logitech_G403_Prodigy_Gaming_Mouse_1274375E3330-event-mouse" | |
| "/dev/input/by-id/usb-Corsair_Corsair_K65_RGB_Gaming_Keyboard_01031005AE3998A7534EC0CAF5001942-if01-event-kbd" |