6: Reverted NixOS hardware to specific commit, updated flake lock, updated device UUIDs for new install, added gaming mode specialisation, added nerd fonts with updated syntax, and added fwupd to powerManagement.nix

This commit is contained in:
uzy lol 2024-12-16 20:04:49 -08:00
parent 52cd44e7ce
commit 0cb64fc7cc
7 changed files with 88 additions and 43 deletions

View File

@ -56,11 +56,11 @@
"flake-compat_3": { "flake-compat_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1733328505,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731604581, "lastModified": 1734344598,
"narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", "rev": "83ecd50915a09dca928971139d3a102377a8d242",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -222,11 +222,11 @@
"zig-deps-fod": "zig-deps-fod" "zig-deps-fod": "zig-deps-fod"
}, },
"locked": { "locked": {
"lastModified": 1731742830, "lastModified": 1731793907,
"narHash": "sha256-w3cMP/IWj8ZMG2ZGP7B5rEznZROFCs0Z2e7Y0pAEHjU=", "narHash": "sha256-oDWPl9V7AGM+cci9/jhlQlVSImuNqfcu3t3ffmxEyY4=",
"owner": "water-sucks", "owner": "water-sucks",
"repo": "nixos", "repo": "nixos",
"rev": "19c876a042fa8998715a94c5535eede1ce4e381b", "rev": "2d44c5c8a077f778b96fd1f213611786144d9a72",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -237,17 +237,17 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1731403644, "lastModified": 1733065584,
"narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=", "narHash": "sha256-22W/cVrIMhIk0tTqBuuR8G49sftPElGhvFAWA8p06CM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f6581f1c3b137086e42a08a906bdada63045f991", "rev": "893d255bed44d251e84e90fad25e7ad5f45cf117",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "893d255bed44d251e84e90fad25e7ad5f45cf117",
"type": "github" "type": "github"
} }
}, },
@ -325,11 +325,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1731319897, "lastModified": 1734119587,
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "dc460ec76cbff0e66e269457d7b728432263166c", "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -409,11 +409,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731644206, "lastModified": 1734322624,
"narHash": "sha256-J4HjGCDIJTBjlzhHDjQpbci/fMIE8eNcgOAKbDJUlBs=", "narHash": "sha256-9G6h+hHM8RyUvan2qojZwHlRoJ3gkLwZQLsW7bXyNrE=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "f8f8cac5aabb30009610e7ee4b56f04291577a12", "rev": "f8289a4668187d3866caa7940dfd8ff680e41d0d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

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

View File

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

View File

@ -1,5 +1,17 @@
{ pkgs, ... }:
{ {
pkgs,
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 # Enable OpenGL
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
@ -9,4 +21,33 @@
intel-compute-runtime intel-compute-runtime
]; ];
}; };
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 ];
};
};
} }

View File

@ -14,20 +14,20 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/81e848c1-1481-456b-8df6-47eb247771ef"; { device = "/dev/disk/by-uuid/f687d29b-d636-432a-98bb-af7f6e3dc226";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-929e4b3e-0219-4593-aa5f-4e60fca1d7e4".device = "/dev/disk/by-uuid/929e4b3e-0219-4593-aa5f-4e60fca1d7e4"; boot.initrd.luks.devices."luks-33fd1822-bf27-4a3e-a8e7-1c703185a503".device = "/dev/disk/by-uuid/33fd1822-bf27-4a3e-a8e7-1c703185a503";
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D5DB-A0C5"; { device = "/dev/disk/by-uuid/653C-4F14";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [ "fmask=0077" "dmask=0077" ];
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/000c73ce-2d51-47c8-b751-baae70aac0a4"; } [ { device = "/dev/disk/by-uuid/7b97e697-298b-4af4-b8ff-8b0bef8d7520"; }
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@ -1,6 +1,8 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override {fonts = [ "JetBrainsMono" "CascadiaCode" ]; }) nerd-fonts.jetbrains-mono
nerd-fonts.caskaydia-cove
nerd-fonts._3270
]; ];
} }

View File

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