here is my full config. roast it/me. I wish Corectrl or Lact or sysfs inputs worked so i can cool the card Designed to operate at 50-60c (smh… planned obsolecence). Since Corectrl hasnt worked there is an OS i want to do in VM, Nobara, and have the GPU passed through to it while i use my integrated graphics on the i7 13th gen chip to boot and run the ‘desktop’ monitor (the gpu passthough will go to the TV).
I want to sincerly say thank you to everyone who chimes in. Wishing you all a great day from Cumberland, MD.:
{ config, pkgs, ... }:
{
# Hardware configuration import
imports = [ ./hardware-configuration.nix ];
# Boot configuration
boot = {
kernelModules = [ "acpi_cpufreq" ];
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
initrd.kernelModules = [
"vfio_pci"
"vfio"
"vfio_iommu_type1"
"i915"
];
kernelParams = [
"intel_iommu=on"
"modprobe.blacklist=amdgpu,"
"vfio-pci.ids=1002:7590,1002:ab40"
];
};
boot.blacklistedKernelModules = [
"amdgpu"
];
# System environment configuration
environment = {
etc."systemd/system-sleep/wakeup-hook".source = pkgs.writeShellScript "wakeup-hook" ''
#!/bin/sh
case "$1" in
post)
for dev in PEG0 RP03 RP25 XHCI AWAC; do
echo "$dev" > /proc/acpi/wakeup
done
for f in /sys/bus/usb/devices/*/power/wakeup; do
echo disabled > "$f"
done
;;
esac
'';
systemPackages = with pkgs; [
# Audio and Multimedia
audacious
easyeffects
cheese
gst_all_1.gst-libav
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
gst_all_1.gstreamer
vlc
xorriso
xsane
# Video Editing and Design
darktable
freecad
gimp
inkscape
imagemagick
texliveFull
poppler-utils
biber
graphviz
# Utilities
baobab
blueman
cdrtools
dvdplusrwtools
iotop
gnome-disk-utility
gnome-system-monitor
lm_sensors
smartmontools
spice-gtk
spice-vdagent
usbutils
udftools
xpad
macchanger
bashInteractive
gcc
gdb
python3
sbcl
pciutils
# Office and Productivity
libreoffice
lollypop
libreoffice
mate.atril
calcurse
texliveFull
chromium
img2pdf
shared-mime-info
xdot
pandoc
# Development tools
geany
neovim
nixpkgs-fmt
qbittorrent
texliveFull
gimp
virt-manager
];
};
# File system options
fileSystems."/".options = [ "acl" ];
# Hardware configuration
hardware = {
bluetooth = {
enable = true;
powerOnBoot = true;
};
sane = {
enable = true;
extraBackends = [ pkgs.sane-airscan pkgs.hplipWithPlugin ];
};
};
# Locale and internationalization
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
# Network configuration
networking = {
hostName = "nixos";
networkmanager.enable = true;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Power management
powerManagement.cpuFreqGovernor = "powersave";
programs.virt-manager.enable = true;
# Programs configuration
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
# Libraries for graphical and media support
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
dbus
gdk-pixbuf
glib
gtk3
libdrm
libglvnd
libpulseaudio
libstartup_notification
mesa
nspr
nss
pango
pciutils
xorg.libX11
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXt
xorg.libXtst
xorg.libxcb
xorg.libxkbfile
];
};
# Security settings
security = {
rtkit.enable = true;
sudo.extraRules = [
{
users = [ "christopher" ];
commands = [
{ command = "/run/current-system/sw/bin/cpupower"; options = [ "NOPASSWD" ]; }
{ command = "/run/current-system/sw/bin/scanimage"; options = [ "NOPASSWD" ]; }
{ command = "/usr/bin/umount"; options = [ "NOPASSWD" ]; }
];
}
];
wrappers.spice-client-glib-usb-acl-helper = {
source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
owner = "root";
group = "root";
permissions = "4755";
};
};
# Services configuration
services = {
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
printing.enable = true;
pulseaudio.enable = false;
udev.packages = [ pkgs.hplipWithPlugin ];
xserver = {
enable = true;
displayManager.lightdm.enable = true;
desktopManager.xfce.enable = true;
xkb.layout = "us";
};
};
# Udev extra rules for scanner permissions
services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTR{idVendor}=="04a9", ATTR{idProduct}=="1913", GROUP="scanner", MODE="0660"
'';
# System configuration
system = {
stateVersion = "25.05";
};
# Systemd service for disabling wake-on devices
systemd = {
services.disable-wake-devices = {
description = "Disable wake-on ACPI devices";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "disable-wake-devices" ''
for dev in PEG0 RP03 RP25 XHCI AWAC; do
echo "$dev" > /proc/acpi/wakeup
done
'';
};
};
# Virtualization sockets configuration
sockets = builtins.listToAttrs (map (name: {
name = "${name}.socket";
value.wantedBy = [ "sockets.target" ];
}) [
"virtlockd"
"virtlogd"
"libvirtd"
"libvirtd-ro"
"libvirtd-admin"
]);
};
# Time zone configuration
time.timeZone = "America/New_York";
users.extraUsers.christopher.extraGroups = [ "libvirtd" ];
# User configuration for "christopher"
users.users.christopher = {
isNormalUser = true;
description = "christopher";
extraGroups = [
"networkmanager"
"usb"
"plugdev"
"lp"
"wheel"
"optical"
"disk"
"scanner"
"libvirtd"
"kvm"
"qemu-libvirtd"
"video"
"render"
"libvirt"
];
packages = [ ];
};
# Virtualization configuration
virtualisation.spiceUSBRedirection.enable = true;
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [(pkgs.OVMF.override {
secureBoot = true;
tpmSupport = true;
}).fd];
};
};
};
}