try to introduce pipewire

feature/hass
Ingolf Wagner 2022-04-17 20:16:40 +02:00
parent 5a319e8f44
commit 32c347ddee
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
8 changed files with 15 additions and 14 deletions

View File

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

View File

@ -253,7 +253,7 @@ in
isNormalUser = true; isNormalUser = true;
group = "users"; group = "users";
# enable video usage # 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 # add groups to mainUser

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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