From 0d320cd7336eecacf9cb6dcac3555098dab1b33c Mon Sep 17 00:00:00 2001 From: "Agatha V. Lovelace" Date: Fri, 29 Sep 2023 15:11:40 +0200 Subject: [PATCH] Audio config refactor --- common/fragments/graphical/audio.nix | 9 +++++++-- common/fragments/graphical/default.nix | 5 +++++ hosts/ritual/configuration.nix | 5 ----- hosts/tears/configuration.nix | 5 ----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/fragments/graphical/audio.nix b/common/fragments/graphical/audio.nix index 4c66a63..3dfe63a 100644 --- a/common/fragments/graphical/audio.nix +++ b/common/fragments/graphical/audio.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: { +{ config, pkgs, lib, ... }: { # Pipewire security.rtkit.enable = true; services.pipewire = { @@ -19,7 +19,12 @@ wantedBy = [ "graphical-session.target" ]; serviceConfig = { - ExecStart = "${pkgs.noisetorch}/bin/noisetorch -i"; + ExecStart = "${pkgs.noisetorch}/bin/noisetorch -i -s ${ + if config.networking.hostName == "tears" then + "alsa_input.usb-BEHRINGER_UMC202HD_192k-00.HiFi__umc202hd_mono_in_U192k_0_0__source" + else + "alsa_input.pci-0000_00_1f.3.analog-stereo" + }"; ExecStop = "${pkgs.noisetorch}/bin/noisetorch -u"; Restart = "on-failure"; RestartSec = 5; diff --git a/common/fragments/graphical/default.nix b/common/fragments/graphical/default.nix index d7f3dd1..f55e1b7 100644 --- a/common/fragments/graphical/default.nix +++ b/common/fragments/graphical/default.nix @@ -298,6 +298,11 @@ drivers = [ pkgs.hplip ]; }; + hardware.bluetooth = { + enable = true; + settings = { General = { Disable = "Headset"; }; }; + }; + # Fix Wireguard NetworkManager connections networking.firewall.checkReversePath = "loose"; } diff --git a/hosts/ritual/configuration.nix b/hosts/ritual/configuration.nix index b9f3873..163d87e 100644 --- a/hosts/ritual/configuration.nix +++ b/hosts/ritual/configuration.nix @@ -39,11 +39,6 @@ oci-containers = { backend = "podman"; }; }; - hardware.bluetooth = { - enable = true; - settings = { General = { Disable = "Headset"; }; }; - }; - # Don't suspend when closed and plugged into power services.logind.lidSwitchExternalPower = "lock"; diff --git a/hosts/tears/configuration.nix b/hosts/tears/configuration.nix index a29c021..37b0741 100644 --- a/hosts/tears/configuration.nix +++ b/hosts/tears/configuration.nix @@ -39,11 +39,6 @@ oci-containers = { backend = "podman"; }; }; - hardware.bluetooth = { - enable = true; - settings = { General = { Disable = "Headset"; }; }; - }; - home-manager.users.agatha = { xsession.windowManager.bspwm = { monitors = {