sarien: move to nixos-hardware

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-03-30 15:22:47 +03:00
parent 1d80084950
commit 99b62d5194
4 changed files with 41 additions and 57 deletions

View File

@ -39,7 +39,6 @@
]; ];
initrd = { initrd = {
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
kernelModules = ["i915"];
systemd.enable = true; # needed for auto-unlocking with TPM systemd.enable = true; # needed for auto-unlocking with TPM
}; };
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
@ -53,9 +52,4 @@
}; };
plymouth.enable = true; plymouth.enable = true;
}; };
console = {
earlySetup = true;
packages = [pkgs.terminus_font];
font = "${pkgs.terminus_font}/share/consolefonts/ter-c18n.psf.gz";
};
} }

View File

@ -8,11 +8,10 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
common-cpu-amd-pstate common-cpu-amd-pstate
common-gpu-intel common-gpu-intel
common-hidpi
common-pc-ssd common-pc-ssd
]; ];
hardware.enableRedistributableFirmware = true;
hardware.intelgpu.vaapiDriver = "intel-media-driver";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {
enableRedistributableFirmware = true;
intelgpu.vaapiDriver = "intel-media-driver";
};
} }

View File

@ -11,11 +11,6 @@
# kernelPackages = pkgs.linuxPackages_latest; # kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_cachyos; kernelPackages = pkgs.linuxPackages_cachyos;
kernelModules = ["kvm-intel"]; kernelModules = ["kvm-intel"];
kernelParams = [
"i915.enable_guc=2"
"i915.enable_fbc=1"
"i915.enable_psr=2"
];
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
loader.systemd-boot = { loader.systemd-boot = {
enable = true; enable = true;

View File

@ -1,31 +1,26 @@
{ {
config,
lib, lib,
pkgs, inputs,
modulesPath, modulesPath,
... ...
}: { }: {
imports = [ imports = with inputs.nixos-hardware.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
common-cpu-intel
common-gpu-intel-kaby-lake
common-hidpi
common-pc-laptop-ssd
]; ];
services.logind = { nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.enableRedistributableFirmware = true;
services = {
logind = {
lidSwitch = "ignore"; lidSwitch = "ignore";
powerKey = "suspend"; powerKey = "suspend";
}; };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; udev.extraHwdb = ''
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vpl-gpu-rt
];
};
services.udev.extraHwdb = ''
evdev:input:b0011v0001p0001eAB83* evdev:input:b0011v0001p0001eAB83*
KEYBOARD_KEY_d5=sysrq KEYBOARD_KEY_d5=sysrq
KEYBOARD_KEY_d4=leftmeta KEYBOARD_KEY_d4=leftmeta
@ -33,7 +28,7 @@
KEYBOARD_KEY_91=brightnessup KEYBOARD_KEY_91=brightnessup
''; '';
services.keyd = { keyd = {
enable = true; enable = true;
keyboards = { keyboards = {
default = { default = {
@ -56,4 +51,5 @@
}; };
}; };
}; };
};
} }