feat(audio): add enable option

This commit is contained in:
2026-05-22 10:21:39 +02:00
parent fef88cf1a4
commit cff26bd47b
4 changed files with 27 additions and 9 deletions

View File

@@ -58,6 +58,7 @@
git.github.enable = true;
shell.bash.aliases.lang-js = true;
shell.bash.addBinToPath = true;
audio.enable = true;
devenv.enable = true;
keepassxc.enable = true;
direnv.enable = true;

View File

@@ -55,6 +55,7 @@
shell.bash.aliases.lang-js = true;
shell.bash.addBinToPath = true;
my.yubikey.enable = true;
audio.enable = true;
devenv.enable = true;
keepassxc.enable = true;
direnv.enable = true;

View File

@@ -1,7 +1,19 @@
{ osConfig, pkgs, ... }:
{
home.packages = with pkgs; [ pulsemixer ];
config,
lib,
pkgs,
osConfig,
...
}:
services.mpris-proxy.enable = osConfig.hardware.bluetooth.enable or false;
let
cfg = config.audio;
in
{
options.audio.enable = lib.mkEnableOption "audio";
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ pulsemixer ];
services.mpris-proxy.enable = osConfig.hardware.bluetooth.enable or false;
};
}

View File

@@ -1,17 +1,21 @@
{ ... }:
{ lib, config, ... }:
let
cfg = config.audio;
in
{
imports = [
./audio-automation.nix
];
imports = [ ./audio-automation.nix ];
config = {
options.audio.enable = lib.mkEnableOption "audio";
config = lib.mkIf cfg.enable {
nixpkgs.allowedUnfree = [
"spotify"
"spotify-unwrapped"
];
security.rtkit.enable = true;
services = {
pulseaudio.enable = false;
pipewire = {