This commit is contained in:
Hadi
2024-06-19 09:55:58 +02:00
parent 063534079d
commit 10f3754b0a
5 changed files with 34 additions and 7 deletions

View File

@@ -46,6 +46,7 @@ in {
nvidia-vaapi-driver
vaapiVdpau
libvdpau-va-gl
mesa
];
};
};

View File

@@ -1,11 +1,11 @@
{
hardware.nvidia.prime = {
# offload = {
# enable = true;
# enableOffloadCmd = true;
# };
offload = {
enable = true;
enableOffloadCmd = true;
};
sync.enable = true;
# sync.enable = true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";

23
hosts/modules/usb.nix Normal file
View File

@@ -0,0 +1,23 @@
{ pkgs, ... }:
{
# USB Automounting
services.gvfs.enable = true;
# services.udisks2.enable = true;
# services.devmon.enable = true;
# Enable USB Guard
services.usbguard = {
enable = true;
dbus.enable = true;
implicitPolicyTarget = "block";
# FIXME: set yours pref USB devices (change {id} to your trusted USB device), use `lsusb` command (from usbutils package) to get list of all connected USB devices including integrated devices like camera, bluetooth, wifi, etc. with their IDs or just disable `usbguard`
rules = ''
allow id {id} # device 1
allow id {id} # device 2
'';
};
# Enable USB-specific packages
environment.systemPackages = with pkgs; [ usbutils ];
}