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

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