2: Updated stuff for new install and fully embraced Precision 5530 NixOS hardware config. Also removed unnecessary Nvidia specialisation

This commit is contained in:
uzy lol 2025-01-13 07:52:24 -08:00
parent c5132348d1
commit 33f89598d6
6 changed files with 10 additions and 55 deletions

View File

@ -790,17 +790,16 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1733065584,
"narHash": "sha256-22W/cVrIMhIk0tTqBuuR8G49sftPElGhvFAWA8p06CM=",
"lastModified": 1736441705,
"narHash": "sha256-OL7leZ6KBhcDF3nEKe4aZVfIm6xQpb1Kb+mxySIP93o=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "893d255bed44d251e84e90fad25e7ad5f45cf117",
"rev": "8870dcaff63dfc6647fb10648b827e9d40b0a337",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "893d255bed44d251e84e90fad25e7ad5f45cf117",
"type": "github"
}
},

View File

@ -21,7 +21,7 @@
#};
nixos-hardware = {
url = "github:NixOS/nixos-hardware/893d255bed44d251e84e90fad25e7ad5f45cf117";
url = "github:NixOS/nixos-hardware";
};
nixos-cli = {

View File

@ -4,7 +4,7 @@
boot.loader.efi.canTouchEfiVariables = true;
# Copied from default configuration file
boot.initrd.luks.devices."luks-520879a6-1cac-4c27-95b1-1d5a0d817684".device = "/dev/disk/by-uuid/520879a6-1cac-4c27-95b1-1d5a0d817684";
boot.initrd.luks.devices."luks-668849b8-3d8e-4c15-aac9-181206dceb64".device = "/dev/disk/by-uuid/668849b8-3d8e-4c15-aac9-181206dceb64";
# GRUB and MC theme disabled due to an issue - "nixos.png not found"
# Enable Grub and set required parameters to make system bootable

View File

@ -3,15 +3,7 @@
lib,
config,
...
}: let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
'';
in {
}: {
# Enable OpenGL
hardware.graphics = {
enable = true;
@ -25,38 +17,4 @@ in {
environment.systemPackages = with pkgs; [
lshw
];
specialisation = {
gaming-mode.configuration = {
system.nixos.tags = ["gaming-mode"];
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
intelBusId = lib.mkDefault "PCI:0:2:0";
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
};
};
environment.systemPackages = [nvidia-offload];
# Limit charging using TLP. Also turn off auto-cpufreq to avoid conflict
services.auto-cpufreq.enable = lib.mkForce false;
services.tlp = {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
};
};
}

View File

@ -14,20 +14,20 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f687d29b-d636-432a-98bb-af7f6e3dc226";
{ device = "/dev/disk/by-uuid/937e3ce3-554d-4249-b1b0-1d4c0dcf568c";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-33fd1822-bf27-4a3e-a8e7-1c703185a503".device = "/dev/disk/by-uuid/33fd1822-bf27-4a3e-a8e7-1c703185a503";
boot.initrd.luks.devices."luks-1335075f-fce0-4057-964d-b30cca308aef".device = "/dev/disk/by-uuid/1335075f-fce0-4057-964d-b30cca308aef";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/653C-4F14";
{ device = "/dev/disk/by-uuid/0C95-0FAD";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/7b97e697-298b-4af4-b8ff-8b0bef8d7520"; }
[ { device = "/dev/disk/by-uuid/23c2d8c2-21f7-4c92-be68-23eb2f689e30"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@ -10,8 +10,6 @@
thermald.enable = true;
fwupd.enable = true;
# List of governors:
# - performance
# - powersave