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, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
users.users.mainUser.extraGroups = [ "audio" ];
|
users.users.mainUser.extraGroups = [ "audio" "pipewire" ];
|
||||||
|
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 ];
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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: ''
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue