From d74ed6665e31195f445f0a565cca3bad776f26ab Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Mon, 10 Jun 2024 23:01:18 +0200 Subject: [PATCH] build kernel modules for usbip --- random-pkgs.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/random-pkgs.nix b/random-pkgs.nix index e826fea..787ae44 100644 --- a/random-pkgs.nix +++ b/random-pkgs.nix @@ -2,6 +2,46 @@ system, inputs, nixpkgs, self, ... }:{ + usbip-kernel = self.nixosConfigurations.main.config.system.build.kernel.overrideAttrs (prev: { + kernelPatches = prev.kernelPatches or [] ++ [ { + name = "usbip"; + patch = "null"; + extraConfig = '' + USB_ACM y + USBIP_CORE y + USBIP_VHCI_HCD y + USBIP_VHCI_HC PORTS 8 + USBIP_VHCI_NR_HCS 1 + USBIP_DEBUG y + USBIP_SERIAL y + ''; + } ]; + }); + kernel-test = (nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + inherit specialArgs; + modules = [ + ./hosts/main.nix + ./hardware/hpm-laptop.nix + #self.nixosConfigurations.main._module + { + boot.kernelPatches = [ { + name = "usbip"; + patch = null; + extraConfig = '' + USB_ACM m + USBIP_CORE m + USBIP_VHCI_HCD m + USBIP_VHCI_NR_HCS 1 + ''; + #USBIP_VHCI_HC PORTS 8 + #USBIP_DEBUG y + #USBIP_SERIAL y + } ]; + } + ]; + }).config.system.build.kernel; + tunefox = mypkgs.firefox-unwrapped.overrideAttrs (final: prev: { NIX_CFLAGS_COMPILE = [ (prev.NIX_CFLAGS_COMPILE or "") ] ++ [ "-O3" "-march=native" "-fPIC" ]; requireSigning = false;