mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 16:23:57 +01:00
26348c28ea
Might rename again in the future, but for now this is an easy way to keep track of all hardware-specific config.
33 lines
840 B
Nix
33 lines
840 B
Nix
{ pkgs, config, lib, ... }:
|
|
|
|
let
|
|
inherit (lib) mkEnableOption;
|
|
inherit (pkgs) piper;
|
|
|
|
cfg = config.modules.hardware;
|
|
in
|
|
{
|
|
options.modules.hardware = {
|
|
enable = mkEnableOption "hardware-specific configuration";
|
|
mouseSettings = mkEnableOption "piper for mouse settings";
|
|
laptopKeyboard = mkEnableOption "laptop keyboard";
|
|
lidIgnore = mkEnableOption "lid switch to standby";
|
|
powerIgnore = mkEnableOption "ignoring the power key";
|
|
};
|
|
|
|
# TODO: lib.mkIf cfg.enable
|
|
config = {
|
|
services.ratbagd.enable = true;
|
|
environment.systemPackages = [ piper ];
|
|
|
|
services.udev.extraRules = ''
|
|
KERNEL=="event*", ATTRS{name}=="AT Translated Set 2 keyboard", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
|
'';
|
|
|
|
services.logind = {
|
|
lidSwitch = "ignore";
|
|
extraConfig = "HandlePowerKey=ignore";
|
|
};
|
|
};
|
|
}
|