58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (config.grimmShared) enable laptop_hardware graphical;
|
|
in
|
|
{
|
|
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
|
|
];
|
|
|
|
services.udev.packages = with pkgs; [ yubikey-personalization ];
|
|
boot.bcache.enable = false;
|
|
|
|
services.libinput.enable = true;
|
|
|
|
# hardware.opentabletdriver.enable = true;
|
|
# systemd.user.services.opentabletdriver.after = [ "local-fs.target" ];
|
|
|
|
services.udisks2.enable = true;
|
|
boot = {
|
|
kernelParams = [
|
|
"nohibernate"
|
|
];
|
|
loader.efi.canTouchEfiVariables = true;
|
|
initrd.availableKernelModules = [
|
|
"xhci_pci"
|
|
"ahci"
|
|
"nvme"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
];
|
|
loader.systemd-boot.enable = true;
|
|
};
|
|
};
|
|
|
|
options.grimmShared.laptop_hardware = {
|
|
enable = lib.mkEnableOption "grimm-laptop";
|
|
};
|
|
}
|