2021-03-31 00:35:59 +04:00
|
|
|
{ pkgs, config, lib, inputs, ... }:
|
2020-02-17 17:00:59 +04:00
|
|
|
|
2021-01-21 22:13:53 +04:00
|
|
|
with rec { inherit (config) device deviceSpecific; };
|
2020-02-17 17:00:59 +04:00
|
|
|
with deviceSpecific; {
|
|
|
|
hardware.enableRedistributableFirmware = true; # For some unfree drivers
|
|
|
|
|
|
|
|
hardware.opengl.enable = true;
|
|
|
|
hardware.opengl.driSupport = true;
|
|
|
|
hardware.opengl.driSupport32Bit = true; # For steam
|
2020-07-31 16:11:51 +04:00
|
|
|
hardware.opengl.package = pkgs.mesa_drivers;
|
2020-02-17 17:00:59 +04:00
|
|
|
|
|
|
|
hardware.bluetooth.enable = true;
|
2020-11-22 11:41:13 +04:00
|
|
|
hardware.bluetooth.package = pkgs.bluezFull;
|
2020-02-17 17:00:59 +04:00
|
|
|
|
2021-01-21 22:13:53 +04:00
|
|
|
hardware.sane.enable = true;
|
2020-12-24 16:19:24 +04:00
|
|
|
|
|
|
|
services.saned.enable = true;
|
|
|
|
|
2020-02-17 17:00:59 +04:00
|
|
|
services.logind.lidSwitchExternalPower = "ignore";
|
|
|
|
|
|
|
|
services.logind.extraConfig = "HandlePowerKey=suspend";
|
2021-01-21 22:13:53 +04:00
|
|
|
|
2020-02-17 17:00:59 +04:00
|
|
|
sound.enable = true;
|
|
|
|
hardware.pulseaudio = {
|
|
|
|
enable = true;
|
2021-03-31 00:35:59 +04:00
|
|
|
package = pkgs.callPackage ({ ... }:
|
|
|
|
let orig = pkgs.pulseaudioFull;
|
|
|
|
in pkgs.stdenv.mkDerivation rec {
|
|
|
|
pname = "pulseaudio";
|
|
|
|
version = "1.1.1"; # For compatibility
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
src = inputs.pulseaudio;
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
perlPackages.perl
|
|
|
|
perlPackages.XMLParser
|
|
|
|
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
];
|
|
|
|
inherit (orig)
|
|
|
|
propagatedBuildInputs configureFlags installFlags postInstall
|
|
|
|
preFixup;
|
|
|
|
buildInputs = orig.buildInputs
|
|
|
|
++ (with pkgs; [ libexecinfo tdb orc check ]);
|
|
|
|
preConfigure = ''
|
|
|
|
echo "$version" > .tarball-version
|
|
|
|
'';
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk=disabled"
|
|
|
|
"-Delogind=disabled"
|
|
|
|
"-Dvalgrind=disabled"
|
|
|
|
"-Dtcpwrap=disabled"
|
|
|
|
"-Dbluez5-gstreamer=disabled"
|
|
|
|
"-Dgstreamer=disabled"
|
|
|
|
"-Dsystemduserunitdir=lib/systemd/user"
|
|
|
|
"-Dudevrulesdir=lib/udev/rules.d"
|
|
|
|
];
|
|
|
|
}) { };
|
2020-02-17 17:00:59 +04:00
|
|
|
support32Bit = true;
|
|
|
|
extraConfig = ''
|
|
|
|
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
|
2020-08-05 16:56:47 +04:00
|
|
|
load-module module-bluetooth-policy auto_switch=2
|
2020-02-17 17:00:59 +04:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|