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 = {
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
kernelModules = ["i915"];
systemd.enable = true; # needed for auto-unlocking with TPM
};
loader.efi.canTouchEfiVariables = true;
@ -53,9 +52,4 @@
};
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")
common-cpu-amd-pstate
common-gpu-intel
common-hidpi
common-pc-ssd
];
hardware.enableRedistributableFirmware = true;
hardware.intelgpu.vaapiDriver = "intel-media-driver";
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_cachyos;
kernelModules = ["kvm-intel"];
kernelParams = [
"i915.enable_guc=2"
"i915.enable_fbc=1"
"i915.enable_psr=2"
];
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot = {
enable = true;

View File

@ -1,31 +1,26 @@
{
config,
lib,
pkgs,
inputs,
modulesPath,
...
}: {
imports = [
imports = with inputs.nixos-hardware.nixosModules; [
(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";
powerKey = "suspend";
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
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 = ''
udev.extraHwdb = ''
evdev:input:b0011v0001p0001eAB83*
KEYBOARD_KEY_d5=sysrq
KEYBOARD_KEY_d4=leftmeta
@ -33,7 +28,7 @@
KEYBOARD_KEY_91=brightnessup
'';
services.keyd = {
keyd = {
enable = true;
keyboards = {
default = {
@ -56,4 +51,5 @@
};
};
};
};
}