nvidia fix m3-ares

This commit is contained in:
m3tm3re
2026-01-03 09:31:59 +01:00
parent 841d7abbe7
commit f615f3bd6a
5 changed files with 29 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
{ {
config, config,
pkgs, pkgs,
videoDrivers,
... ...
}: { }: {
imports = [ imports = [
@@ -14,7 +15,12 @@
]; ];
cli.stt-ptt = { cli.stt-ptt = {
enable = true; enable = true;
whisperPackage = pkgs.whisper-cpp-vulkan; whisperPackage =
if videoDrivers == ["nvidia"]
then pkgs.whisper-cpp.override {cudaSupport = true;}
else if videoDrivers == ["amdgpu"]
then pkgs.whisper-cpp-vulkan
else pkgs.whisper-cpp;
model = "ggml-large-v3-turbo"; model = "ggml-large-v3-turbo";
notifyTimeout = 2000; notifyTimeout = 2000;
}; };
@@ -33,9 +39,7 @@
programs.bat = { programs.bat = {
enable = true; enable = true;
config = { config = {theme = "universal";};
theme = "universal";
};
themes = { themes = {
universal = { universal = {
src = pkgs.writeText "universal.tmTheme" '' src = pkgs.writeText "universal.tmTheme" ''
@@ -165,8 +169,7 @@
programs.direnv = { programs.direnv = {
enable = true; enable = true;
enableNushellIntegration = true; enableNushellIntegration = true;
nix-direnv.enable = nix-direnv.enable = true;
true;
}; };
programs.eza = { programs.eza = {

View File

@@ -1,11 +1,5 @@
# Common configuration for all hosts # Common configuration for all hosts
{ { config, pkgs, lib, inputs, outputs, ... }: {
pkgs,
lib,
inputs,
outputs,
...
}: {
imports = [ imports = [
./extraServices ./extraServices
./ports.nix ./ports.nix
@@ -13,15 +7,17 @@
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
]; ];
environment.pathsToLink = [ environment.pathsToLink =
"/share/xdg-desktop-portal" [ "/share/xdg-desktop-portal" "/share/applications" ];
"/share/applications"
];
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {
inherit inputs outputs;
videoDrivers = config.services.xserver.videoDrivers or [ ];
}; };
};
nixpkgs = { nixpkgs = {
# You can add overlays here # You can add overlays here
overlays = [ overlays = [
@@ -69,10 +65,9 @@
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
optimise.automatic = true; optimise.automatic = true;
registry = registry = (lib.mapAttrs (_: flake: { inherit flake; }))
(lib.mapAttrs (_: flake: {inherit flake;}))
((lib.filterAttrs (_: lib.isType "flake")) inputs); ((lib.filterAttrs (_: lib.isType "flake")) inputs);
nixPath = ["/etc/nix/path"]; nixPath = [ "/etc/nix/path" ];
}; };
users.defaultUserShell = pkgs.nushell; users.defaultUserShell = pkgs.nushell;
} }

View File

@@ -1,11 +1,7 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ {pkgs, ...}: {
config,
pkgs,
...
}: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@@ -13,7 +9,6 @@
specialisation = { specialisation = {
"NVIDIA".configuration = { "NVIDIA".configuration = {
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
system.nixos.tags = ["NVIDIA"]; system.nixos.tags = ["NVIDIA"];
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia-container-toolkit.enable = true; hardware.nvidia-container-toolkit.enable = true;
@@ -31,6 +26,8 @@
options kvm_intel emulate_invalid_guest_state=0 options kvm_intel emulate_invalid_guest_state=0
options kvm ignore_msrs=1 options kvm ignore_msrs=1
''; '';
boot.blacklistedKernelModules = ["nova_core"];
# CRITICAL FIX #4: Kernel parameters to prevent nouveau from loading early
networking.hostName = "m3-ares"; # Define your hostname. networking.hostName = "m3-ares"; # Define your hostname.
# warp-terminal update fix # warp-terminal update fix

View File

@@ -1,4 +1,8 @@
{pkgs, ...}: { {
config,
pkgs,
...
}: {
hardware.nvidia = { hardware.nvidia = {
prime = { prime = {
offload.enable = false; offload.enable = false;
@@ -15,6 +19,7 @@
open = false; open = false;
dynamicBoost.enable = true; dynamicBoost.enable = true;
nvidiaSettings = true; nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.production;
}; };
hardware.tuxedo-drivers.enable = true; hardware.tuxedo-drivers.enable = true;
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;

View File

@@ -33,6 +33,7 @@
userServices = true; userServices = true;
}; };
}; };
displayManager.gdm.enable = true;
}; };
systemd.sleep.extraConfig = '' systemd.sleep.extraConfig = ''
AllowSuspend=no AllowSuspend=no