summaryrefslogtreecommitdiff
path: root/os/core/audio.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-03-13 23:41:17 +0100
committeradikro <adikro@disroot.org>2026-03-13 23:41:17 +0100
commitf0c0e311c003057f24d8045509a627ad2acab978 (patch)
treea1955fe601c487aab46fa47838cd25b8273508ac /os/core/audio.nix
parentffefb53956c38909da77fe7ebbbb5d8b5dd823b9 (diff)
removing obsolete stuff
Diffstat (limited to 'os/core/audio.nix')
-rw-r--r--os/core/audio.nix15
1 files changed, 10 insertions, 5 deletions
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
];