{ lib, config, pkgs, ... }: with lib; let psCfg = config.pub-solar; xdg = config.home-manager.users."${psCfg.user.name}".xdg; in { users.users."${psCfg.user.name}" = { extraGroups = ["audio"]; packages = with pkgs; [ # easyeffects, e.g. for microphone noise filtering easyeffects mu pavucontrol pa_applet playerctl # Needed for pactl cmd, until pw-cli is more mature (vol up/down hotkeys?) pulseaudio vimpc spotify-tui ]; }; home-manager.users."${psCfg.user.name}" = { xdg.configFile."vimpc/vimpcrc".source = ./.config/vimpc/vimpcrc; systemd.user.services.easyeffects = import ./easyeffects.service.nix pkgs; services.spotifyd = { enable = false; settings = { global = { username = "spotify@benjaminbaedorf.eu"; password_cmd = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus ${pkgs.libsecret}/bin/secret-tool lookup spotify password"; bitrate = 320; volume_normalisation = true; no_audio_cache = false; max_cache_size = 1000000000; }; }; }; }; # rtkit is optional but recommended security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; wireplumber.enable = true; # If you want to use JACK applications, uncomment this jack.enable = true; }; }