nixos-config/profiles/hardware.nix

31 lines
892 B
Nix
Raw Normal View History

{ pkgs, config, lib, inputs, ... }:
2020-02-17 16:00:59 +03:00
2021-01-21 21:13:53 +03:00
with rec { inherit (config) device deviceSpecific; };
2020-02-17 16:00:59 +03:00
with deviceSpecific; {
hardware.enableRedistributableFirmware = true; # For some unfree drivers
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true; # For steam
hardware.opengl.package = pkgs.mesa_drivers;
2020-02-17 16:00:59 +03:00
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
systemd.services.bluetooth.serviceConfig.ExecStart = lib.mkForce [ "" "${pkgs.bluezFull}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -E" ];
2020-02-17 16:00:59 +03:00
2021-06-08 19:35:21 +03:00
persist.state.directories = [ "/var/lib/bluetooth" ];
2021-06-07 18:22:59 +03:00
systemd.services.systemd-udev-settle.enable = false;
2021-07-27 18:12:19 +03:00
services.upower = { enable = true; };
2020-12-24 15:19:24 +03:00
2020-02-17 16:00:59 +03:00
services.logind.lidSwitchExternalPower = "ignore";
services.logind.extraConfig = "HandlePowerKey=suspend";
2021-01-21 21:13:53 +03:00
2021-04-04 00:04:51 +03:00
# sound.enable = true;
2020-02-17 16:00:59 +03:00
}