got nvidia propritary Drivers working{

This commit is contained in:
steven carpenter 2025-09-01 16:20:13 -04:00
parent 92fea90ac6
commit 9ba38635df
9 changed files with 170 additions and 96 deletions

66
flake.lock generated
View file

@ -153,20 +153,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-schemas": {
"locked": {
"lastModified": 1721999734,
"narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=",
"rev": "0a5c42297d870156d9c57d8f99e476b738dcd982",
"revCount": 75,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -824,16 +810,17 @@
}, },
"nixpkgs_10": { "nixpkgs_10": {
"locked": { "locked": {
"lastModified": 1752308619, "lastModified": 1753844155,
"narHash": "sha256-pzrVLKRQNPrii06Rm09Q0i0dq3wt2t2pciT/GNq5EZQ=", "narHash": "sha256-w81jpZeM3AtYlTKIhT05p3IqvJRIHZPyp0Acgb6hXWc=",
"rev": "650e572363c091045cdbc5b36b0f4c1f614d3058", "owner": "NixOS",
"revCount": 806273, "repo": "nixpkgs",
"type": "tarball", "rev": "e44b8dc0882d66e2627a8ff252b04a22f4a629fd",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.806273%2Brev-650e572363c091045cdbc5b36b0f4c1f614d3058/019804de-4447-7b40-88ef-4e58b0e7553e/source.tar.gz" "type": "github"
}, },
"original": { "original": {
"type": "tarball", "id": "nixpkgs",
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" "ref": "nixpkgs-unstable",
"type": "indirect"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
@ -1027,17 +1014,16 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1751159013, "lastModified": 1753934621,
"narHash": "sha256-ROTyPZ5CxbNmCrXiQBQDyJOfEJrF2ZGExVoAcXwiEMA=", "narHash": "sha256-figluHBPK0GxE1xJcdmYGR0qtXIDFj08Lgilo9xdBtU=",
"ref": "refs/heads/main", "rev": "5fcad9436d6c2b3236979962ba283ecbd034db7a",
"rev": "95063ba566db81a0a40e49d9ba02060a93087562", "revCount": 70,
"revCount": 65, "type": "tarball",
"type": "git", "url": "https://api.flakehub.com/f/pinned/specCon18/sk_extract/1.0.4/01985ea8-3adb-7366-b632-f42ad2214319/source.tar.gz"
"url": "https://git.skdevstudios.com/specCon18/sk_extract.git"
}, },
"original": { "original": {
"type": "git", "type": "tarball",
"url": "https://git.skdevstudios.com/specCon18/sk_extract.git" "url": "https://flakehub.com/f/specCon18/sk_extract/1.0.4"
} }
}, },
"sops-nix": { "sops-nix": {
@ -1238,21 +1224,19 @@
}, },
"yunodo": { "yunodo": {
"inputs": { "inputs": {
"flake-schemas": "flake-schemas",
"nixpkgs": "nixpkgs_10" "nixpkgs": "nixpkgs_10"
}, },
"locked": { "locked": {
"lastModified": 1752585859, "lastModified": 1717319278,
"narHash": "sha256-QQD++CqMHHzLU+FLjPgkhGfs5WwhtikarDEShyd3w3s=", "narHash": "sha256-zVvNjZpriC5AO+nAzIcB0wuFbeidBtm8A78D9ZwGmKI=",
"ref": "refs/heads/main", "rev": "375fe6c9827b7bce27404049102c26deaf54a250",
"rev": "9e9a9e4f1e4f909bb3d3bf32a2a80549fffa7786", "revCount": 22,
"revCount": 15, "type": "tarball",
"type": "git", "url": "https://api.flakehub.com/f/pinned/specCon18/YUNODO/0.1.22%2Brev-375fe6c9827b7bce27404049102c26deaf54a250/018fd844-6abd-7bea-a06b-1011111afc20/source.tar.gz"
"url": "https://git.skdevstudios.com/specCon18/yunodo_redux.git"
}, },
"original": { "original": {
"type": "git", "type": "tarball",
"url": "https://git.skdevstudios.com/specCon18/yunodo_redux.git" "url": "https://flakehub.com/f/specCon18/YUNODO/0.1.22"
} }
} }
}, },

View file

@ -1,5 +1,5 @@
{ {
description = "Nixos config flake"; description = "My Nixos config flake";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";

View file

@ -1,8 +1,9 @@
{ config, pkgs, lib, self,inputs, ... }: {config, pkgs, lib, self,inputs, ... }:
{ {
system.stateVersion = "23.05"; system.stateVersion = "23.05";
# Hardware # Hardware
hardware = { hardware = {
enableRedistributableFirmware = lib.mkDefault true; enableRedistributableFirmware = lib.mkDefault true;
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
@ -24,11 +25,10 @@
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod"];
kernelModules = [ ]; kernelModules = [ ];
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
# Prevent tampering of the pkgstore # Prevent tampering of the pkgstore
readOnlyNixStore = true; readOnlyNixStore = true;
}; };
@ -53,10 +53,18 @@
networking = { networking = {
hostName = "katana"; # Define your hostname. hostName = "katana"; # Define your hostname.
networkmanager.enable = true; #Enable Network Manager networkmanager.enable = true; #Enable Network Manager
# ┏━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
# ┃ Port # ┃ Type ┃ Purpose ┃
# ┣━━━━━━━━━╋━━━━━━╋━━━━━━━━━━━━━━━━━━━━━┫
# ┃ 1990 ┃ UDP ┃ Bambu Printer Comms ┃
# ┃ 2021 ┃ UDP ┃ Bambu Printer Comms ┃
# ┗━━━━━━━━━┻━━━━━━┻━━━━━━━━━━━━━━━━━━━━━┛
firewall = { firewall = {
checkReversePath = "loose"; checkReversePath = "loose";
allowedTCPPorts = [ ]; allowedTCPPorts = [ ];
allowedUDPPorts = [ 1990 2021 ]; allowedUDPPorts = [ 1990 2021 ];
# Both iptables commands are to get multicast working for orca slicer for my bambu printer
extraCommands = '' extraCommands = ''
iptables -I INPUT -m pkttype --pkt-type multicast -j ACCEPT iptables -I INPUT -m pkttype --pkt-type multicast -j ACCEPT
iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
@ -86,10 +94,11 @@
# Services # Services
services = { services = {
pcscd.enable = true; flatpak.enable = true; #flatpak
blueman.enable = false; pcscd.enable = true; #yubikey
pulseaudio.enable = false; blueman.enable = false; #bluetooth
printing.enable = true; pulseaudio.enable = false; #Audio
printing.enable = true; #Printing
xserver = { xserver = {
xkb = { xkb = {
layout = "us"; layout = "us";
@ -122,7 +131,6 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gparted # Drive Partition Manger gparted # Drive Partition Manger
bluez # Bluetooth Stack bluez # Bluetooth Stack
# blueman # Bluetooth Management
home-manager # Dotfiles Management home-manager # Dotfiles Management
pkg-config # Determine lib locations for linking during compliation pkg-config # Determine lib locations for linking during compliation
ripgrep # regex parser written in rust ripgrep # regex parser written in rust
@ -159,6 +167,11 @@
openscad #cad software for 3d modeling programattically openscad #cad software for 3d modeling programattically
orca-slicer #3d printer slicer orca-slicer #3d printer slicer
wishlist #ssh bastion wishlist #ssh bastion
fd # required for nvim config telescope
rustdesk #remote tech support
pciutils #lspci
lshw # for getting bus ids for PRIME
dracut # for lsinitrd
]; ];
# Fonts # Fonts

View file

@ -27,7 +27,7 @@
speccon18.hm.zsh.enable = true; speccon18.hm.zsh.enable = true;
speccon18.hm.rio.enable = false; speccon18.hm.rio.enable = false;
speccon18.hm.ssh.enable = true; speccon18.hm.ssh.enable = true;
speccon18.hm.superfile.enable = true; speccon18.hm.superfile.enable = false;
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home = { home = {
@ -71,7 +71,13 @@
# echo "Hello, ${config.home.username}!" # echo "Hello, ${config.home.username}!"
# '') # '')
]; ];
sessionVariables = {
POP_SMTP_HOST = "smtp.protonmail.ch";
POP_SMTP_PORT = "587";
POP_SMTP_USERNAME = "steven.carpenter@skdevstudios.com";
POP_FROM = "steven.carpenter@skdevstudios.com";
POP_SMTP_PASSWORD = "2SJ83CHLPPVQ2RLT";
};
# Home Manager is pretty good at managing dotfiles. The primary way to manage # Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'. # plain files is through 'home.file'.
file = { file = {

View file

@ -8,7 +8,7 @@
package = pkgs.superfile; package = pkgs.superfile;
hotkeys = { hotkeys = {
confirm = [ "enter" "" ]; confirm = [ "enter" "" ];
quit = [ "ctrl+c" "" ]; quit = [ "ctrl+q" "" ];
list_up = [ "k" "up" ]; list_up = [ "k" "up" ];
list_down = [ "j" "down" ]; list_down = [ "j" "down" ];
page_up = [ "pgup" "" ]; page_up = [ "pgup" "" ];

View file

@ -17,11 +17,12 @@
syntaxHighlighting.enable = lib.mkDefault true; syntaxHighlighting.enable = lib.mkDefault true;
shellAliases = { shellAliases = {
ls = "eza -l"; mo2 = "steam-run steamtinkerlaunch mo2 start";
lsa = "eza -al"; ls = "eza --icons -alog --group-directories-first --no-permissions --no-time --total-size --git --header";
grep = "rg"; #grep = "rg";
osrb = "sudo nixos-rebuild $1 --flake ~/Documents/code/nix/nixos-config/#katana"; osrb = "sudo nixos-rebuild $1 --flake ~/Documents/code/nix/nixos-config/#katana";
nvim-cfg = "nvim /home/speccon18/.config/nvim/"; nvim-cfg = "nvim /home/speccon18/.config/nvim/";
edit-nix-cfg = "nvim --cmd 'cd /home/speccon18/Documents/code/nix/nixos-config' flake.nix";
cat = "bat"; cat = "bat";
}; };

View file

@ -0,0 +1,7 @@
{pkgs,config,...}:{
imports = [
./fnv.nix
];
speccon18.applications.fnv.enable = true;
}

View file

@ -0,0 +1,62 @@
{ pkgs, config, lib, ... }: {
options.speccon18.applications.fnv.enable =
lib.mkEnableOption "enable config for Fallout New Vegas";
config = lib.mkIf config.speccon18.applications.fnv.enable {
# Load nvidia driver for Xorg and Wayland
# For offloading, `modesetting` is needed additionally,
# otherwise the X-server will be running permanently on nvidia,
# thus keeping the GPU always on (see `nvidia-smi`).
services.xserver.videoDrivers = [
"nvidia"
];
# Blacklist Nouveau driver to force 3060 to use nvidia driver
boot.blacklistedKernelModules = [ "nouveau" ];
# Enable OpenGL
hardware = {
graphics = {
enable = true;
enable32Bit = true;
};
nvidia = {
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.latest;
prime = {
sync.enable = true;
# Make sure to use the correct Bus ID values for your system!
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
open = true;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
};
};
};
}

View file

@ -2,5 +2,6 @@
imports = [ imports = [
./desktop-environments ./desktop-environments
./services ./services
./applications
]; ];
} }