try to introduce pipewire

This commit is contained in:
Ingolf Wagner 2022-04-17 20:16:40 +02:00
parent 5a319e8f44
commit 32c347ddee
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
8 changed files with 15 additions and 14 deletions

View file

@ -1,5 +1,5 @@
{ pkgs, lib, config, ... }: {
users.users.mainUser.extraGroups = [ "audio" ];
users.users.mainUser.extraGroups = [ "audio" "pipewire" ];
hardware.pulseaudio = {
enable = true;

View file

@ -253,7 +253,7 @@ in
isNormalUser = true;
group = "users";
# enable video usage
extraGroups = if config.gpu then [ "video" "audio" ] else [ "audio" ];
extraGroups = if config.gpu then [ "video" "audio" "pipewire" ] else [ "audio" "pipewire" ];
});
# add groups to mainUser

View file

@ -118,7 +118,7 @@ in
isNormalUser = true;
group = "users";
# enable video usage
extraGroups = [ "video" "audio" ];
extraGroups = [ "video" "audio" "pipewire" ];
};
environment.systemPackages = [ bin backupScript desktopFile ];

View file

@ -32,7 +32,7 @@ in
isNormalUser = true;
home = "/home/steam";
createHome = true;
extraGroups = [ "audio" "input" "video" ];
extraGroups = [ "audio" "input" "video" "pipewire" ];
};
# for steam

View file

@ -85,28 +85,27 @@ in
# ----------
# because of systemWide ensure main user is in audio group
system.custom.mainUser.extraGroups = [ "audio" ];
system.custom.mainUser.extraGroups = [ "audio" "pipewire" ];
#services.pipewire = {
# enable = true;
# alsa.enable = true;
# jack.enable = true;
# media-session.enable = true;
# systemWide = true;
# media-session.enable = false;
# pulse.enable = true;
# jack.enable = false;
# alsa.enable = false;
#};
#hardware.pulseaudio.enable = false;
# todo use pipewire for this
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
# all in audio group can do audio
systemWide = true;
extraConfig = ''
# automatically switch to newly-connected devices
load-module module-switch-on-connect
# http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html
# https://gavv.github.io/articles/pulseaudio-under-the-hood/#ladspa-plugin-sink
${builtins.toString (flip map cfg.sinks (sink: ''

View file

@ -55,6 +55,8 @@ in
# to browse logs better
lnav
nixos-option
storepath
prefetch-git-rendered

View file

@ -12,7 +12,7 @@ let
''
module NixCommands where
nixStartIrc = "${pkgs.rxvt_unicode}/bin/urxvt -e irc"
nixStartChat = "${pkgs.element-desktop}/bin/element-desktop"
nixStartAudacious = "${pkgs.audacious}/bin/audacious"
nixStartFlameshot = "${pkgs.flameshot}/bin/flameshot gui -p /share/"
nixInvertColors = "${pkgs.xcalib}/bin/xcalib -invert -alter"

View file

@ -99,7 +99,7 @@ projects =
[ Project
{ projectName = "chat"
, projectDirectory = "~/"
, projectStartHook = Just $ spawn nixStartIrc
, projectStartHook = Just $ spawn nixStartChat
}
, Project
{ projectName = "audio"