From 7e9d7a7cee8a1054c6637a1e205f1e43677990b2 Mon Sep 17 00:00:00 2001 From: alyx Date: Mon, 28 Jul 2025 13:39:45 +0100 Subject: [PATCH] setpci stuff, this lets me bind 2 ports onto my ehci controllers for usb passthrough --- base/absolution/configuration.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/base/absolution/configuration.nix b/base/absolution/configuration.nix index f4b4db0..8073c2e 100644 --- a/base/absolution/configuration.nix +++ b/base/absolution/configuration.nix @@ -12,6 +12,15 @@ nix.package = pkgs.lix; + systemd.services.setpci = { + description = "this runs the command that binds 2 of my usb ports to the EHCI controller"; + wantedBy = ["multi-user.target"]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.pciutils}/bin/setpci -s0:14.0 0xd0.W=0x3f3f"; + }; + }; + nix.settings.trusted-users = [ "alyx" "root" ]; #services.udev.extraRules = builtins.readFile ./udev.rules; @@ -191,12 +200,6 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - # Enable the X11 windowing system. services.xserver.enable = false; programs.dconf.enable = true; @@ -313,6 +316,7 @@ p7zip cabextract unzip + pciutils wineWowPackages.stable (pkgs.python3.withPackages (ps: with ps; [tkinter])) ];