Commit f2f5bc7
Changed files (4)
hosts
chaser-kevin
hosts/chaser-kevin/boot.nix
@@ -1,14 +1,21 @@
-{...}: {
+{pkgs, ...}: {
boot.loader = {
grub = {
enable = true;
- device = "nodev";
+ devices = ["nodev"];
efiSupport = true;
- gfxmodeEfi = "1024x768";
+ gfxmodeEfi = "1200x800";
+ useOSProber = true;
+ theme = "${pkgs.kdePackages.breeze-grub}/grub/themes/breeze";
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
+
+ boot.plymouth = {
+ enable = true;
+ logo = "${pkgs.nixos-icons}/share/icons/hicolor/128x128/apps/nix-snowflake.png";
+ };
}
hosts/chaser-kevin/default.nix
@@ -5,7 +5,7 @@
}:
#############################################################
#
-# Kevin - NixOS running on ThinkBook 16P 2024
+# Kevin - NixOS running on ThinkBook 16P G5 IRX
# My main computer, with I7-14650HX + RTX4060 Laptop GPU + 48GB memory, for daily use.
#
#############################################################
hosts/chaser-kevin/hardware-configuration.nix
@@ -12,11 +12,26 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
+ boot.initrd.systemd = {
+ enable = true;
+ };
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt" "usbhid" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
+ boot.kernelParams = [
+ "mem_sleep_default=deep"
+ # "resume_offset=51651840"
+ ];
+ # boot.resumeDevice = "/dev/disk/by-uuid/d1fb32f2-1dc0-435d-ad0f-1de0a121dbef";
boot.extraModulePackages = [];
+ swapDevices = [
+ {
+ device = "/var/lib/swapfile";
+ size = 48 * 1024; # 48GB in MB
+ }
+ ];
+
fileSystems."/" = {
device = "/dev/disk/by-uuid/d1fb32f2-1dc0-435d-ad0f-1de0a121dbef";
fsType = "btrfs";
@@ -47,10 +62,6 @@
options = ["uid=1000" "gid=100"];
};
- swapDevices = [
- {device = "/dev/disk/by-uuid/39640e68-8296-4cdb-ab16-b9dfcd4ae743";}
- ];
-
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
hosts/chaser-kevin/nvidia.nix
@@ -1,30 +1,27 @@
{
- nixos-hardware,
config,
lib,
...
-}: let
- nvidiaPackage = config.hardware.nvidia.package; # Nvidia ada lovelace
-in {
- imports = [
- nixos-hardware.nixosModules.common-gpu-nvidia
- ];
-
- services.xserver.videoDrivers = ["nvidia" "modesetting"]; # will install nvidia-vaapi-driver by default
+}: {
+ services.xserver.videoDrivers = ["nvidia"]; # will install nvidia-vaapi-driver by default
boot.initrd.kernelModules = ["nvidia"];
- boot.extraModulePackages = [config.boot.kernelPackages.nvidia_x11];
- boot.kernelParams = ["nvidia-drm.modeset=1"];
# Nvidia ada lovelace
hardware.nvidia = {
- modesetting.enable = true;
- powerManagement.enable = true;
- powerManagement.finegrained = true;
+ package = config.boot.kernelPackages.nvidiaPackages.production;
+ open = false;
prime = {
- intelBusId = "PCI:00:02:0";
- nvidiaBusId = "PCI:01:00:0";
+ intelBusId = "PCI:0:2:0";
+ nvidiaBusId = "PCI:1:0:0";
+ offload = {
+ enable = true;
+ enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true;
+ };
+ };
+ powerManagement = {
+ enable = true;
+ finegrained = true;
};
- open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
};
hardware.nvidia-container-toolkit.enable = true;