try to introduce pipewire
This commit is contained in:
parent
5a319e8f44
commit
32c347ddee
8 changed files with 15 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
users.users.mainUser.extraGroups = [ "audio" ];
|
||||
users.users.mainUser.extraGroups = [ "audio" "pipewire" ];
|
||||
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -118,7 +118,7 @@ in
|
|||
isNormalUser = true;
|
||||
group = "users";
|
||||
# enable video usage
|
||||
extraGroups = [ "video" "audio" ];
|
||||
extraGroups = [ "video" "audio" "pipewire" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = [ bin backupScript desktopFile ];
|
||||
|
|
|
@ -32,7 +32,7 @@ in
|
|||
isNormalUser = true;
|
||||
home = "/home/steam";
|
||||
createHome = true;
|
||||
extraGroups = [ "audio" "input" "video" ];
|
||||
extraGroups = [ "audio" "input" "video" "pipewire" ];
|
||||
};
|
||||
|
||||
# for steam
|
||||
|
|
|
@ -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: ''
|
||||
|
|
|
@ -55,6 +55,8 @@ in
|
|||
# to browse logs better
|
||||
lnav
|
||||
|
||||
nixos-option
|
||||
|
||||
storepath
|
||||
|
||||
prefetch-git-rendered
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -99,7 +99,7 @@ projects =
|
|||
[ Project
|
||||
{ projectName = "chat"
|
||||
, projectDirectory = "~/"
|
||||
, projectStartHook = Just $ spawn nixStartIrc
|
||||
, projectStartHook = Just $ spawn nixStartChat
|
||||
}
|
||||
, Project
|
||||
{ projectName = "audio"
|
||||
|
|
Loading…
Reference in a new issue