grimm-nixos-laptop/common/hardware/laptop.nix

59 lines
1.2 KiB
Nix
Raw Normal View History

2024-05-07 23:31:41 +02:00
{
pkgs,
config,
lib,
...
}:
2024-04-18 21:16:40 +02:00
let
2024-05-11 22:55:59 +02:00
inherit (config.grimmShared) enable laptop_hardware graphical;
2024-04-18 21:16:40 +02:00
in
{
2024-05-11 22:55:59 +02:00
config = lib.mkIf (enable && laptop_hardware.enable) {
environment.systemPackages =
with pkgs;
[
lm_sensors
lshw
pciutils
usbutils
ddcutil
python312Packages.py-cpuinfo
(writeShellScriptBin "lsiommu" ./lsiommu)
]
++ lib.optionals graphical [
opentabletdriver
ddcui
wootility
];
2024-04-26 10:25:17 +02:00
2024-09-28 22:09:24 +02:00
services.udev.packages = with pkgs; [ yubikey-personalization ];
2024-11-01 16:33:26 +01:00
boot.bcache.enable = false;
2024-06-13 22:56:30 +02:00
2024-05-11 22:55:59 +02:00
services.libinput.enable = true;
2025-01-27 10:38:55 +01:00
# hardware.opentabletdriver.enable = true;
# systemd.user.services.opentabletdriver.after = [ "local-fs.target" ];
2024-11-26 19:20:10 +01:00
2024-05-11 22:55:59 +02:00
services.udisks2.enable = true;
boot = {
2024-11-26 19:20:10 +01:00
kernelParams = [
"nohibernate"
];
2024-05-11 22:55:59 +02:00
loader.efi.canTouchEfiVariables = true;
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
loader.systemd-boot.enable = true;
2024-04-18 21:16:40 +02:00
};
2024-05-11 22:55:59 +02:00
};
2024-04-18 21:16:40 +02:00
options.grimmShared.laptop_hardware = {
enable = lib.mkEnableOption "grimm-laptop";
};
}