updates
This commit is contained in:
parent
1557caba8b
commit
1e6daa09f6
74
flake.lock
generated
74
flake.lock
generated
@ -50,11 +50,11 @@
|
|||||||
"flake-compat_3": {
|
"flake-compat_3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733328505,
|
"lastModified": 1747046372,
|
||||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -184,11 +184,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749160002,
|
"lastModified": 1752467539,
|
||||||
"narHash": "sha256-IM3xKjsKxhu7Y1WdgTltrLKiOJS8nW7D4SUDEMNr7CI=",
|
"narHash": "sha256-4kaR+xmng9YPASckfvIgl5flF/1nAZOplM+Wp9I5SMI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "68cc9eeb3875ae9682c04629f20738e1e79d72aa",
|
"rev": "1e54837569e0b80797c47be4720fab19e0db1616",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -226,11 +226,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745057346,
|
"lastModified": 1751809810,
|
||||||
"narHash": "sha256-71cyYKUul9owRzbcObXkzhTBcmnXJsvmk1gq0RbP5PQ=",
|
"narHash": "sha256-DNI/IxfFRNDrGPdpwsEsmXCYFeKdRDRKDLcDimZWrVE=",
|
||||||
"owner": "taj-ny",
|
"owner": "taj-ny",
|
||||||
"repo": "kwin-effects-forceblur",
|
"repo": "kwin-effects-forceblur",
|
||||||
"rev": "fea9f80f27389aa8a62befb5babf40b28fed328d",
|
"rev": "26ea1b6830143b15dba114fce754f6253e9eb5a5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -273,11 +273,11 @@
|
|||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749121763,
|
"lastModified": 1751591814,
|
||||||
"narHash": "sha256-TVFiyMBs+3KEzZVwf/n1zedUWzPrMPzud/2Jiho8dcE=",
|
"narHash": "sha256-A4lgvuj4v+Pr8MniXz1FBG0DXOygi8tTECR+j53FMhM=",
|
||||||
"owner": "lilyinstarlight",
|
"owner": "lilyinstarlight",
|
||||||
"repo": "nixos-cosmic",
|
"repo": "nixos-cosmic",
|
||||||
"rev": "c89df80b72b4e1802fd91a35f4857868c953c1c0",
|
"rev": "fef2d0c78c4e4d6c600a88795af193131ff51bdc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -292,11 +292,11 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746453552,
|
"lastModified": 1752199438,
|
||||||
"narHash": "sha256-r66UGha+7KVHkI7ksrcMjnw/mm9Sg4l5bQlylxHwdGU=",
|
"narHash": "sha256-xSBMmGtq8K4Qv80TMqREmESCAsRLJRHAbFH2T/2Bf1Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "be618645aa0adf461f778500172b6896d5ab2d01",
|
"rev": "d34d9412556d3a896e294534ccd25f53b6822e80",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -340,11 +340,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748995628,
|
"lastModified": 1751048012,
|
||||||
"narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=",
|
"narHash": "sha256-MYbotu4UjWpTsq01wglhN5xDRfZYLFtNk7SBY0BcjkU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8eb3b6a2366a7095939cd22f0dc0e9991313294b",
|
"rev": "a684c58d46ebbede49f280b653b9e56100aa3877",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -356,11 +356,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748929857,
|
"lastModified": 1751011381,
|
||||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
"narHash": "sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
"rev": "30e2e2857ba47844aa71991daa6ed1fc678bcbb7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -372,27 +372,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742937945,
|
"lastModified": 1751792365,
|
||||||
"narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=",
|
"narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7",
|
"rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.11",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748929857,
|
"lastModified": 1752480373,
|
||||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
"narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
"rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -490,11 +490,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749091064,
|
"lastModified": 1751251399,
|
||||||
"narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=",
|
"narHash": "sha256-y+viCuy/eKKpkX1K2gDvXIJI/yzvy6zA3HObapz9XZ0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "12419593ce78f2e8e1e89a373c6515885e218acb",
|
"rev": "b22d5ee8c60ed1291521f2dde48784edd6bf695b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -532,11 +532,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747603214,
|
"lastModified": 1752544651,
|
||||||
"narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=",
|
"narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=",
|
||||||
"owner": "mic92",
|
"owner": "mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd",
|
"rev": "2c8def626f54708a9c38a5861866660395bb3461",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -632,11 +632,11 @@
|
|||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749093358,
|
"lastModified": 1752557104,
|
||||||
"narHash": "sha256-Clx1BzHsSSzIXbnCW9KM3m5gW3SFgemcW9/4XH4epeM=",
|
"narHash": "sha256-nPHrsq0vSh0+BqV2xAAVsfoVqzP9KYG7Zicc6oA0nfk=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "d4cf0ac2e860be17036a376ae99b233a115826bc",
|
"rev": "dca4ebb877124f9f3d797da30cb19f8b958ef7f5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@ -1,32 +0,0 @@
|
|||||||
{ config
|
|
||||||
, lib
|
|
||||||
, inputs
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
inherit (lib.my-namespace) disabled enabled;
|
|
||||||
|
|
||||||
cfg = config.my-namespace.cosmic-desktop;
|
|
||||||
# moduleImports = {
|
|
||||||
# "enabled" = [inputs.nixos-cosmic.nixosModules.default];
|
|
||||||
# "disabled" = [];
|
|
||||||
# };
|
|
||||||
# optionalImports = { imports = []; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my-namespace.cosmic-desktop = {
|
|
||||||
enable = mkEnableOption "Enable cosmic";
|
|
||||||
};
|
|
||||||
imports = [ inputs.nixos-cosmic.nixosModules.default ];
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
nix.settings = {
|
|
||||||
substituters = [ "https://cosmic.cachix.org/" ];
|
|
||||||
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.desktopManager.cosmic.enable = true;
|
|
||||||
services.displayManager.cosmic-greeter.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
inherit (lib.my-namespace) disabled enabled;
|
|
||||||
|
|
||||||
cfg = config.my-namespace.hardware.graphics-amd-igpu-only;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my-namespace.hardware.graphics-amd-igpu-only = {
|
|
||||||
enable = mkEnableOption "Enable nvidia";
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
# Enable NVIDIA driver for X11 and Wayland
|
|
||||||
# without modesetting, x server will be run by nvidia
|
|
||||||
services.xserver.videoDrivers = [
|
|
||||||
"amdgpu"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enable OpenGL
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
# extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.graphics.enable32Bit = true; # For 32 bit applications
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.consoleMode = "max";
|
|
||||||
|
|
||||||
# Enable required Kernel Modules
|
|
||||||
boot.initrd.kernelModules = [
|
|
||||||
"amdgpu"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
|
||||||
"amdgpu.modeset=1"
|
|
||||||
"amd_iommu=on"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
# Blacklist intel and nouveau
|
|
||||||
boot.blacklistedKernelModules = [
|
|
||||||
"nouveau"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Modesetting is required.
|
|
||||||
# Add user to extra groups
|
|
||||||
users.users.andreas = {
|
|
||||||
extraGroups = [ "video" "render" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,176 +0,0 @@
|
|||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
inherit (lib.my-namespace) disabled enabled;
|
|
||||||
|
|
||||||
cfg = config.my-namespace.hardware.graphics-nvidia-prime-amd-testing;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my-namespace.hardware.graphics-nvidia-prime-amd-testing = {
|
|
||||||
enable = mkEnableOption "Enable nvidia";
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
# Enable NVIDIA driver for X11 and Wayland
|
|
||||||
# without modesetting, x server will be run by nvidia
|
|
||||||
services.xserver.videoDrivers = [
|
|
||||||
"nvidia"
|
|
||||||
# "nvidia-drm"
|
|
||||||
# "nvidia-uvm"
|
|
||||||
# "nvidia-modeset"
|
|
||||||
# "nvidiafb"
|
|
||||||
"amdgpu"
|
|
||||||
# "modesetting"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enable OpenGL
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.graphics.enable32Bit = true; # For 32 bit applications
|
|
||||||
|
|
||||||
# Enable Switcheroo
|
|
||||||
services.switcherooControl.enable = true;
|
|
||||||
|
|
||||||
# Use Beta Driver Package
|
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.consoleMode = "max";
|
|
||||||
|
|
||||||
# Enable required Kernel Modules
|
|
||||||
boot.initrd.kernelModules = [
|
|
||||||
"nvidia"
|
|
||||||
"nvidia-drm"
|
|
||||||
"nvidia-uvm"
|
|
||||||
"nvidia-modeset"
|
|
||||||
"nvidiafb"
|
|
||||||
"amdgpu"
|
|
||||||
# # "i2c-nvidia_gpu"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
|
||||||
# "amdgpu.modeset=1"
|
|
||||||
# "nvidia-drm.fbdev=1"
|
|
||||||
# "nvidia-drm.modeset=1"
|
|
||||||
# # "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
|
|
||||||
"amd_iommu=on"
|
|
||||||
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
|
||||||
# "nomodeset"
|
|
||||||
# "nvidia_drm.modeset=1"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
# Blacklist intel and nouveau
|
|
||||||
boot.blacklistedKernelModules = [
|
|
||||||
# "i915"
|
|
||||||
"nouveau"
|
|
||||||
# "nvidia"
|
|
||||||
# "nvidia-drm"
|
|
||||||
# "nvidia-uvm"
|
|
||||||
# "nvidiafb"
|
|
||||||
# "nvidia_drm"
|
|
||||||
# "nvidia_modeset"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Extra blacklist nouveau
|
|
||||||
# boot.extraModprobeConfig = ''
|
|
||||||
# blacklist nouveau
|
|
||||||
# options nouveau modeset=0
|
|
||||||
# '';
|
|
||||||
|
|
||||||
# services.xserver.config = lib.mkForce ''
|
|
||||||
# Section "ServerLayout"
|
|
||||||
# Identifier "layout"
|
|
||||||
# Screen 0 "amdgpu"
|
|
||||||
# Inactive "nvidia"
|
|
||||||
# Option "AllowNVIDIAGPUScreens"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Device"
|
|
||||||
# Identifier "nvidia"
|
|
||||||
# Driver "nvidia"
|
|
||||||
# BusID "PCI:01:0:0"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Screen"
|
|
||||||
# Identifier "nvidia"
|
|
||||||
# Device "nvidia"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Device"
|
|
||||||
# Identifier "amdgpu"
|
|
||||||
# Driver "amdgpu"
|
|
||||||
# BusID "PCI:50:0:0"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Screen"
|
|
||||||
# Identifier "amdgpu"
|
|
||||||
# Device "amdgpu"
|
|
||||||
# EndSection
|
|
||||||
# '';
|
|
||||||
|
|
||||||
# Configure NVIDIA driver
|
|
||||||
hardware.nvidia = {
|
|
||||||
# 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 = true;
|
|
||||||
|
|
||||||
# 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+
|
|
||||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
|
||||||
open = false;
|
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
|
||||||
nvidiaPersistenced = true;
|
|
||||||
forceFullCompositionPipeline = true;
|
|
||||||
|
|
||||||
prime = {
|
|
||||||
offload = {
|
|
||||||
enable = true;
|
|
||||||
enableOffloadCmd = true;
|
|
||||||
};
|
|
||||||
# sync.enable=true;
|
|
||||||
# reverseSync.enable = false;
|
|
||||||
# Make sure to use the correct Bus ID values for your system!
|
|
||||||
# intelBusId = "PCI:0:2:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
# Add user to extra groups
|
|
||||||
users.users.andreas = {
|
|
||||||
extraGroups = [ "video" "render" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,170 +0,0 @@
|
|||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
inherit (lib.my-namespace) disabled enabled;
|
|
||||||
|
|
||||||
cfg = config.my-namespace.hardware.graphics-nvidia-prime-amd;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my-namespace.hardware.graphics-nvidia-prime-amd = {
|
|
||||||
enable = mkEnableOption "Enable nvidia";
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
# Enable NVIDIA driver for X11 and Wayland
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" "nvidia" ];
|
|
||||||
|
|
||||||
services.xserver.displayManager.xserverArgs = [ "-config" "/opt/x11/xserver.conf" ];
|
|
||||||
|
|
||||||
|
|
||||||
services.xserver.config = lib.mkAfter ''
|
|
||||||
Section "ServerLayout"
|
|
||||||
Identifier "layout"
|
|
||||||
Screen 0 "amdgpu"
|
|
||||||
Inactive "nvidia"
|
|
||||||
Option "AllowNVIDIAGPUScreens"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Device"
|
|
||||||
Identifier "nvidia"
|
|
||||||
Driver "nvidia"
|
|
||||||
BusID "PCI:01:0:0"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Screen"
|
|
||||||
Identifier "nvidia"
|
|
||||||
Device "nvidia"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Device"
|
|
||||||
Identifier "amdgpu"
|
|
||||||
Driver "amdgpu"
|
|
||||||
BusID "PCI:50:0:0"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Screen"
|
|
||||||
Identifier "amdgpu"
|
|
||||||
Device "amdgpu"
|
|
||||||
EndSection
|
|
||||||
'';
|
|
||||||
services.switcherooControl.enable = true;
|
|
||||||
|
|
||||||
# Enable OpenGL
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Use Beta Driver Package
|
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.consoleMode = "max";
|
|
||||||
|
|
||||||
# Enable required Kernel Modules
|
|
||||||
boot.initrd.kernelModules = [
|
|
||||||
"nvidia-modeset"
|
|
||||||
"nvidia"
|
|
||||||
# "amdgpu"
|
|
||||||
"nvidia-drm"
|
|
||||||
# "nvidiafb"
|
|
||||||
# "nvidia-uvm"
|
|
||||||
# "i2c-nvidia_gpu"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
|
||||||
# "amdgpu.modeset=1"
|
|
||||||
"nvidia-drm.fbdev=1"
|
|
||||||
"nvidia-drm.modeset=1"
|
|
||||||
# "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
|
|
||||||
# "amd_iommu=on"
|
|
||||||
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
|
||||||
# "nomodeset"
|
|
||||||
# "nvidia_drm.modeset=1"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
# Blacklist intel and nouveau
|
|
||||||
boot.blacklistedKernelModules = [
|
|
||||||
"i915"
|
|
||||||
"nouveau"
|
|
||||||
# "nvidia"
|
|
||||||
# "nvidia-drm"
|
|
||||||
# "nvidia-uvm"
|
|
||||||
# "nvidiafb"
|
|
||||||
# "nvidia_drm"
|
|
||||||
# "nvidia_modeset"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Extra blacklist nouveau
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
blacklist nouveau
|
|
||||||
options nouveau modeset=0
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Configure NVIDIA driver
|
|
||||||
hardware.nvidia = {
|
|
||||||
# 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 = true;
|
|
||||||
|
|
||||||
# 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+
|
|
||||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
|
||||||
open = false;
|
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
|
||||||
|
|
||||||
forceFullCompositionPipeline = false;
|
|
||||||
|
|
||||||
prime = {
|
|
||||||
offload = {
|
|
||||||
enable = lib.mkForce true;
|
|
||||||
enableOffloadCmd = lib.mkForce true;
|
|
||||||
};
|
|
||||||
|
|
||||||
reverseSync.enable = lib.mkForce false;
|
|
||||||
sync.enable = lib.mkForce false;
|
|
||||||
# Make sure to use the correct Bus ID values for your system!
|
|
||||||
# intelBusId = "PCI:0:2:0";
|
|
||||||
nvidiaBusId = "PCI:01:0:0";
|
|
||||||
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add user to extra groups
|
|
||||||
users.users.andreas = {
|
|
||||||
extraGroups = [ "video" "render" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,151 +0,0 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
inherit (lib.my-namespace) disabled enabled;
|
|
||||||
cfg = config.my-namespace.hardware.graphics-nvidia-specializations;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my-namespace.hardware.graphics-nvidia-specializations = {
|
|
||||||
enable = mkEnableOption "Enable nvidia";
|
|
||||||
};
|
|
||||||
options.nvidia-sync.enable = lib.mkEnableOption "Enable NVIDIA prime sync mode";
|
|
||||||
options.nvidia-offload.enable = lib.mkEnableOption "Enable NVIDIA prime sync mode";
|
|
||||||
|
|
||||||
config = {
|
|
||||||
specialisation."NVIDIA-SYNC".configuration = {
|
|
||||||
system.nixos.tags = [ "with-nvidia-sync" ];
|
|
||||||
nvidia-sync.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
specialisation."NVIDIA-OFFLOAD".configuration = {
|
|
||||||
system.nixos.tags = [ "with-nvidia-offload" ];
|
|
||||||
nvidia-offload.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" "amdgpu" ];
|
|
||||||
hardware.graphics = {
|
|
||||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
|
||||||
};
|
|
||||||
boot.kernelParams = [
|
|
||||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
|
||||||
"nvidia-drm.fbdev=0"
|
|
||||||
"nvidia-drm.modeset=0"
|
|
||||||
"amdgpu.modeset=1"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [
|
|
||||||
# "amdgpu"
|
|
||||||
"nvidia"
|
|
||||||
"nvidia-drm"
|
|
||||||
"nvidia_drm"
|
|
||||||
"nvidia-uvm"
|
|
||||||
"nvidia_uvm"
|
|
||||||
# "nvidia-modeset"
|
|
||||||
# "i2c-nvidia_gpu"
|
|
||||||
];
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
|
||||||
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+
|
|
||||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
|
||||||
open = false;
|
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.production;
|
|
||||||
|
|
||||||
prime = {
|
|
||||||
amdgpuBusId = "PCI:50:0:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
} // lib.optionalAttrs config.nvidia-sync.enable {
|
|
||||||
sync.enable = false;
|
|
||||||
} // lib.optionalAttrs (config.nvidia-offload.enable) {
|
|
||||||
offload = {
|
|
||||||
enable = true;
|
|
||||||
enableOffloadCmd = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.xserver.config = lib.mkAfter ''
|
|
||||||
Section "ServerLayout"
|
|
||||||
Identifier "layout"
|
|
||||||
Screen 0 "amdgpu"
|
|
||||||
Inactive "nvidia"
|
|
||||||
Option "AllowNVIDIAGPUScreens"
|
|
||||||
Option "AllowEmptyInitialConfiguration" "True"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Device"
|
|
||||||
Identifier "nvidia"
|
|
||||||
Driver "nvidia"
|
|
||||||
BusID "PCI:01:0:0"
|
|
||||||
Option "AllowEmptyInitialConfiguration" "True"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Screen"
|
|
||||||
Identifier "nvidia"
|
|
||||||
Device "nvidia"
|
|
||||||
Option "AllowEmptyInitialConfiguration" "True"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Device"
|
|
||||||
Identifier "amdgpu"
|
|
||||||
Driver "amdgpu"
|
|
||||||
BusID "PCI:50:0:0"
|
|
||||||
#Option "AllowNVIDIAGPUScreens"
|
|
||||||
#Option "AllowEmptyInitialConfiguration" "True"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "Screen"
|
|
||||||
Identifier "amdgpu"
|
|
||||||
Device "amdgpu"
|
|
||||||
#Option "AllowEmptyInitialConfiguration" "True"
|
|
||||||
EndSection
|
|
||||||
'';
|
|
||||||
# services.xserver.config = lib.mkForce ''
|
|
||||||
# Section "ServerLayout"
|
|
||||||
# Identifier "layout"
|
|
||||||
# Screen 0 "amdgpu"
|
|
||||||
# Inactive "nvidia"
|
|
||||||
# Option "AllowNVIDIAGPUScreens"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Device"
|
|
||||||
# Identifier "nvidia"
|
|
||||||
# Driver "nvidia"
|
|
||||||
# BusID "PCI:01:0:0"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Screen"
|
|
||||||
# Identifier "nvidia"
|
|
||||||
# Device "nvidia"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Device"
|
|
||||||
# Identifier "amdgpu"
|
|
||||||
# Driver "amdgpu"
|
|
||||||
# BusID "PCI:50:0:0"
|
|
||||||
# EndSection
|
|
||||||
|
|
||||||
# Section "Screen"
|
|
||||||
# Identifier "amdgpu"
|
|
||||||
# Device "amdgpu"
|
|
||||||
# EndSection
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -161,8 +161,28 @@
|
|||||||
gnome-tweaks
|
gnome-tweaks
|
||||||
qemu
|
qemu
|
||||||
mpv
|
mpv
|
||||||
|
krita
|
||||||
|
qemu
|
||||||
];
|
];
|
||||||
|
|
||||||
|
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];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" ];
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ in
|
|||||||
users.users.andreas = {
|
users.users.andreas = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Andreas Schaafsma";
|
description = "Andreas Schaafsma";
|
||||||
extraGroups = [ "networkmanager" "wheel" ] ;
|
extraGroups = [ "networkmanager" "wheel" "libvirtd" ] ;
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Packages from inputs
|
# Packages from inputs
|
||||||
inputs.game-of-life.packages.x86_64-linux.default
|
inputs.game-of-life.packages.x86_64-linux.default
|
||||||
@ -64,6 +64,7 @@ in
|
|||||||
minecraft
|
minecraft
|
||||||
trilium-desktop
|
trilium-desktop
|
||||||
terraform
|
terraform
|
||||||
|
virt-manager
|
||||||
# thunderbird
|
# thunderbird
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
# boot.kernelParams = [ "drm.edid_firmware=DP-1:edid/edid.bin,DP-2:edid/edid.bin,DP-3:edid/edid.bin,DP-4:edid/edid.bin" ];
|
# boot.kernelParams = [ "drm.edid_firmware=DP-1:edid/edid.bin,DP-2:edid/edid.bin,DP-3:edid/edid.bin,DP-4:edid/edid.bin" ];
|
||||||
boot.kernelParams = [ "drm.edid_firmware=DP-1:edid/edid.bin,DP-2:edid/edid.bin,DP-3:edid/edid.bin" ];
|
boot.kernelParams = [ "drm.edid_firmware=DP-2:edid/edid.bin" ];
|
||||||
|
|
||||||
|
|
||||||
hardware.firmware = [
|
hardware.firmware = [
|
||||||
|
|||||||
@ -1,94 +1,74 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
############################
|
||||||
|
## Display + Mesa Settings
|
||||||
|
############################
|
||||||
|
|
||||||
# Enable OpenGL
|
# hardware.enableRedistributableFirmware = true;
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
hardware.firmware = [
|
||||||
extraPackages = with pkgs; [
|
pkgs.linux-firmware
|
||||||
vaapiIntel
|
pkgs.firmwareLinuxNonfree
|
||||||
intel-media-driver
|
# pkgs.firmwareLinuxStrict
|
||||||
nvidia-vaapi-driver
|
# pkgs.firmwareLinuxLatest
|
||||||
vpl-gpu-rt # for newer intel GPUs on NixOS >24.05 or unstable
|
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
# Load nvidia driver for Xorg and Wayland
|
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
|
|
||||||
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
|
||||||
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.consoleMode = "max";
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
# "amdgpu.modeset=0"
|
"console=tty0"
|
||||||
"nvidia-drm.fbdev=1"
|
"efifb=off"
|
||||||
|
"xe.force_probe=*"
|
||||||
"nvidia-drm.modeset=1"
|
"nvidia-drm.modeset=1"
|
||||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
|
||||||
"i915.force_probe=e2ff"
|
|
||||||
# "amd_iommu=on"
|
|
||||||
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
|
||||||
# "nomodeset"
|
|
||||||
# "nvidia_drm.modeset=1"
|
|
||||||
];
|
];
|
||||||
boot.blacklistedKernelModules = [
|
|
||||||
# "i915"
|
hardware.graphics = {
|
||||||
"nouveau"
|
enable = true;
|
||||||
"amdgpu"
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-media-driver # Intel VAAPI
|
||||||
|
vpl-gpu-rt # oneVPL runtime
|
||||||
|
vaapiIntel # fallback
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ensure Arc driver is available (usually auto-loaded)
|
||||||
|
boot.kernelModules = [ "xe" ];
|
||||||
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||||
|
|
||||||
|
############################
|
||||||
|
## X / Wayland GPU Drivers
|
||||||
|
############################
|
||||||
|
# Only specify NVIDIA. Intel Arc uses the modesetting driver automatically.
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
boot.initrd.kernelModules = [
|
############################
|
||||||
"nvidia"
|
## NVIDIA Configuration
|
||||||
"nvidia_drm"
|
############################
|
||||||
];
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true; # REQUIRED if any displays are on NVIDIA
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
open = false; # GTX 1070 → must be the proprietary driver
|
||||||
# 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+
|
|
||||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
|
||||||
open = false;
|
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
powerManagement.enable = false;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
powerManagement.finegrained = false;
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
|
||||||
|
|
||||||
forceFullCompositionPipeline = true;
|
|
||||||
|
|
||||||
prime = {
|
prime = {
|
||||||
offload = {
|
offload.enable = false; # not a laptop, must be disabled
|
||||||
enable = true;
|
sync.enable = false;
|
||||||
enableOffloadCmd = true;
|
|
||||||
};
|
|
||||||
reverseSync.enable = false;
|
|
||||||
# Make sure to use the correct Bus ID values for your system!
|
|
||||||
intelBusId = "PCI:01:0:0";
|
|
||||||
nvidiaBusId = "PCI:05:0:0";
|
|
||||||
# amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Correct way to pick the driver
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
};
|
};
|
||||||
users.users.andreas = {
|
|
||||||
extraGroups = [ "video" "render" ];
|
# Remove → hardware.nvidia handles module packages
|
||||||
};
|
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
||||||
|
|
||||||
|
############################
|
||||||
|
## User Access
|
||||||
|
############################
|
||||||
|
users.users.andreas.extraGroups = [ "video" "render" ];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
my-namespace.hardware = {
|
my-namespace.hardware = {
|
||||||
graphics-nvidia-specializations = enabled;
|
# graphics-nvidia-specializations.enabled = false;
|
||||||
# graphics-nvidia-prime-amd = enabled;
|
# graphics-nvidia-prime-amd = enabled;
|
||||||
# graphics-nvidia-prime-amd-testing = enabled;
|
# graphics-nvidia-prime-amd-testing = enabled;
|
||||||
# graphics-amd-igpu-only = enabled;
|
# graphics-amd-igpu-only = enabled;
|
||||||
|
|||||||
@ -16,11 +16,11 @@
|
|||||||
boot.loader.systemd-boot.consoleMode = "max";
|
boot.loader.systemd-boot.consoleMode = "max";
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"amdgpu.modeset=1"
|
# "amdgpu.modeset=0"
|
||||||
"nvidia-drm.fbdev=1"
|
"nvidia-drm.fbdev=1"
|
||||||
"nvidia-drm.modeset=0"
|
"nvidia-drm.modeset=1"
|
||||||
# "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
|
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||||
"amd_iommu=on"
|
# "amd_iommu=on"
|
||||||
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
||||||
# "nomodeset"
|
# "nomodeset"
|
||||||
# "nvidia_drm.modeset=1"
|
# "nvidia_drm.modeset=1"
|
||||||
@ -28,60 +28,22 @@
|
|||||||
boot.blacklistedKernelModules = [
|
boot.blacklistedKernelModules = [
|
||||||
"i915"
|
"i915"
|
||||||
"nouveau"
|
"nouveau"
|
||||||
# "nvidia"
|
"amdgpu"
|
||||||
# "nvidia-drm"
|
|
||||||
# "nvidia-uvm"
|
|
||||||
# "nvidiafb"
|
|
||||||
# "nvidia_drm"
|
|
||||||
# "nvidia_modeset"
|
|
||||||
];
|
];
|
||||||
# boot.extraModprobeConfig = ''
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
# blacklist nvidia
|
|
||||||
# blacklist nvidia-drm
|
|
||||||
# blacklist nvidia_drm
|
|
||||||
# blacklist nvidia-uvm
|
|
||||||
# blacklist nvidia_uvm
|
|
||||||
# blacklist nvidia_modeset
|
|
||||||
# blacklist nvidiafb
|
|
||||||
# blacklist nouveau
|
|
||||||
# options nouveau modeset=0
|
|
||||||
# '';
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
blacklist nouveau
|
|
||||||
options nouveau modeset=0
|
|
||||||
'';
|
|
||||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" "nvidia" ];
|
|
||||||
|
|
||||||
# services.udev.extraRules = ''
|
|
||||||
# # Remove NVIDIA USB xHCI Host Controller devices, if present
|
|
||||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
|
||||||
# # Remove NVIDIA USB Type-C UCSI devices, if present
|
|
||||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
|
||||||
# # Remove NVIDIA Audio devices, if present
|
|
||||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
|
||||||
# # Remove NVIDIA VGA/3D controller devices
|
|
||||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
|
||||||
# '';
|
|
||||||
|
|
||||||
boot.initrd.kernelModules = [
|
boot.initrd.kernelModules = [
|
||||||
"amdgpu"
|
|
||||||
"nvidia"
|
"nvidia"
|
||||||
# "nvidia-drm"
|
"nvidia_drm"
|
||||||
"nvidiafb"
|
|
||||||
# "nvidia-uvm"
|
|
||||||
# "nvidia-modeset"
|
|
||||||
# "i2c-nvidia_gpu"
|
|
||||||
];
|
];
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
# Modesetting is required.
|
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
# 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
|
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||||
# of just the bare essentials.
|
# of just the bare essentials.
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = false;
|
||||||
|
|
||||||
# Fine-grained power management. Turns off GPU when not in use.
|
# Fine-grained power management. Turns off GPU when not in use.
|
||||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||||
@ -105,19 +67,19 @@
|
|||||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
|
|
||||||
forceFullCompositionPipeline = false;
|
forceFullCompositionPipeline = true;
|
||||||
|
|
||||||
prime = {
|
# prime = {
|
||||||
offload = {
|
# offload = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
enableOffloadCmd = true;
|
# enableOffloadCmd = true;
|
||||||
};
|
# };
|
||||||
reverseSync.enable = false;
|
# reverseSync.enable = false;
|
||||||
# Make sure to use the correct Bus ID values for your system!
|
# # Make sure to use the correct Bus ID values for your system!
|
||||||
# intelBusId = "PCI:0:2:0";
|
# # intelBusId = "PCI:0:2:0";
|
||||||
nvidiaBusId = "PCI:01:0:0";
|
# nvidiaBusId = "PCI:01:0:0";
|
||||||
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
# amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
||||||
};
|
# };
|
||||||
|
|
||||||
};
|
};
|
||||||
users.users.andreas = {
|
users.users.andreas = {
|
||||||
|
|||||||
@ -7,18 +7,19 @@
|
|||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
./graphics/nvidia-stable.nix
|
./graphics/intel_nvidia.nix
|
||||||
# ./graphics/nvidia.nix
|
# ./graphics/nvidia.nix
|
||||||
./acer-monitor-edid.nix
|
./acer-monitor-edid.nix
|
||||||
];
|
];
|
||||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
|
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
|
||||||
boot.kernelPackages = pkgs.linuxPackages;
|
# boot.kernelPackages = pkgs.linuxPackages;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.kernelModules = [ "kvm-amd" "4vl2loopback" ];
|
boot.kernelModules = [ "kvm-amd" "4vl2loopback" ];
|
||||||
boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||||
|
boot.supportedFilesystems = [ "ntfs" ];
|
||||||
boot.blacklistedKernelModules = [ ];
|
boot.blacklistedKernelModules = [ ];
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/563805a1-5277-4488-bbdd-c1a7ed37be76";
|
{ device = "/dev/disk/by-uuid/563805a1-5277-4488-bbdd-c1a7ed37be76";
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot.extraModulePackages = [
|
boot.extraModulePackages = [
|
||||||
pkgs.linuxPackages.v4l2loopback # Webcam loopback
|
config.boot.kernelPackages.v4l2loopback # Webcam loopback
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
boot.extraModprobeConfig = ''
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user