2022-11-20 22:14:51 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-06-13 00:14:25 +00:00
|
|
|
let
|
2021-05-30 19:10:28 +00:00
|
|
|
psCfg = config.pub-solar;
|
|
|
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
2022-11-20 22:14:51 +00:00
|
|
|
in
|
|
|
|
{
|
2023-11-10 18:48:06 +00:00
|
|
|
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
|
|
|
|
];
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
home-manager.users."${psCfg.user.name}" = {
|
|
|
|
xdg.configFile."vimpc/vimpcrc".source = ./.config/vimpc/vimpcrc;
|
|
|
|
systemd.user.services.easyeffects = import ./easyeffects.service.nix pkgs;
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# rtkit is optional but recommended
|
|
|
|
security.rtkit.enable = true;
|
2024-04-19 14:55:32 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
2024-04-19 14:55:32 +00:00
|
|
|
# https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PipeWire#setting-sample-rates
|
|
|
|
extraConfig.pipewire = {
|
|
|
|
"10-clock-rate" = {
|
|
|
|
"context.properties" = {
|
|
|
|
default = {
|
|
|
|
"clock.rate" = 48000; # Pipewire default
|
|
|
|
"clock.allowed-rates" = [
|
|
|
|
44100
|
|
|
|
48000
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
}
|