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,56 +1,52 @@
{ {
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 = {
lidSwitch = "ignore";
powerKey = "suspend";
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.enableRedistributableFirmware = true;
hardware.graphics = { services = {
enable = true; logind = {
extraPackages = with pkgs; [ lidSwitch = "ignore";
intel-media-driver powerKey = "suspend";
vaapiIntel };
vpl-gpu-rt
];
};
services.udev.extraHwdb = '' udev.extraHwdb = ''
evdev:input:b0011v0001p0001eAB83* evdev:input:b0011v0001p0001eAB83*
KEYBOARD_KEY_d5=sysrq KEYBOARD_KEY_d5=sysrq
KEYBOARD_KEY_d4=leftmeta KEYBOARD_KEY_d4=leftmeta
KEYBOARD_KEY_95=brightnessdown KEYBOARD_KEY_95=brightnessdown
KEYBOARD_KEY_91=brightnessup KEYBOARD_KEY_91=brightnessup
''; '';
services.keyd = { keyd = {
enable = true; enable = true;
keyboards = { keyboards = {
default = { default = {
ids = ["0001:0001"]; ids = ["0001:0001"];
settings = { settings = {
main = { main = {
camera = "brightnessdown"; camera = "brightnessdown";
prog1 = "brightnessup"; prog1 = "brightnessup";
# home row mods # home row mods
a = "lettermod(alt, a, 200, 150)"; a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)"; s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)"; d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)"; f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)"; j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)"; k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)"; l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)"; ";" = "lettermod(alt, ;, 200, 150)";
};
}; };
}; };
}; };