From f0c0e311c003057f24d8045509a627ad2acab978 Mon Sep 17 00:00:00 2001 From: adikro Date: Fri, 13 Mar 2026 23:41:17 +0100 Subject: removing obsolete stuff --- os/core/audio.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'os/core/audio.nix') diff --git a/os/core/audio.nix b/os/core/audio.nix index e677a90..7527501 100644 --- a/os/core/audio.nix +++ b/os/core/audio.nix @@ -2,11 +2,19 @@ config, lib, pkgs, - username, ... }: let cfg = config.os.core.audio; + toggleMuteNotify = pkgs.writeShellScriptBin "toggle-mute-notify" '' + IS_MUTED=$(${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -c "MUTED") + + if [ "$IS_MUTED" -eq 1 ]; then + ${pkgs.libnotify}/bin/notify-send -a "MuteIndicator" -t 0 -u critical "Microphone Muted" "Mic is currently OFF" + else + ${pkgs.mako}/bin/makoctl dismiss -a "MuteIndicator" + fi + ''; in { options.os.core.audio = { @@ -30,12 +38,9 @@ in spotifyd.enable = true; }; - users.users.${username}.linger = true; - security.rtkit.enable = true; - hardware.enableAllFirmware = true; - environment.systemPackages = with pkgs; [ + toggleMuteNotify crosspipe alsa-utils ]; -- cgit v1.3