nixos/modules/hardware/laptop.nix

34 lines
648 B
Nix
Raw Normal View History

2025-03-29 21:03:07 -04:00
{
config,
lib,
...
}: let
cfg = config.lily.laptop;
in {
options.lily.laptop.enable = lib.mkEnableOption "activate laptop hardware";
config = lib.mkIf cfg.enable {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
Enable = "Source,Sink,Media,Socket";
};
};
};
powerManagement.enable = true;
services = {
libinput.enable = true;
};
systemd.sleep.extraConfig = ''
AllowSuspend=yes
AllowHibernation=yes
AllowHybridSleep=yes
AllowSuspendThenHibernate=yes
'';
};
}