fix pipewire auto-detect

This commit is contained in:
Dmitriy Kholkin 2021-03-17 23:06:52 +03:00
parent cf35e08566
commit bd36b05c5f
3 changed files with 19 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ inputs, config, ... }: {
{ inputs, config, pkgs, ... }: {
imports = with inputs.self.nixosModules; [
./hardware-configuration.nix
inputs.self.nixosProfiles.desktop
@ -23,13 +23,28 @@
};
deviceSpecific.isHost = false;
deviceSpecific.isShared = false;
deviceSpecific.isGaming = false;
deviceSpecific.isGaming = true;
deviceSpecific.enableVirtualisation = false;
boot.blacklistedKernelModules = [
"psmouse"
];
services.acpid.handlers = {
headphone-plugged = {
action = ''
${pkgs.sudo}/bin/sudo -u alukard -H XDG_RUNTIME_DIR=/run/user/1000 ${pkgs.pulseaudio}/bin/pactl set-sink-port alsa_output.pci-0000:00:1f.3.analog-stereo analog-output-headphones
'';
event = "jack/headphone HEADPHONE plug";
};
headphone-unplugged = {
action = ''
${pkgs.sudo}/bin/sudo -u alukard -H XDG_RUNTIME_DIR=/run/user/1000 ${pkgs.pulseaudio}/bin/pactl set-sink-port alsa_output.pci-0000:00:1f.3.analog-stereo analog-output-speaker
'';
event = "jack/headphone HEADPHONE unplug";
};
};
services.fwupd.enable = true;
fileSystems = {

View File

@ -90,7 +90,7 @@ with config.deviceSpecific; {
(steam.override { withJava = true; })
steam-run
] ++ lib.optionals isLaptop [
# acpi
acpi
# blueman
] ++ lib.optionals (config.device == "AMD-Workstation") [
multimc

View File

@ -2,6 +2,7 @@
with config.deviceSpecific; {
services.acpid.enable = true;
services.acpid.logEvents = false;
services.redshift = {
enable = true;