[Bootstrap] Switched to Pipewire

This commit is contained in:
Lucien Cartier-Tilet 2022-02-26 15:36:23 +01:00
parent 8bc5d228dd
commit 56317cc09b
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
3 changed files with 132 additions and 82 deletions

View File

@ -0,0 +1,12 @@
[Unit]
Description=PipeWire Input Filter Chain
After=pipewire.service
BindsTo=pipewire.service
[Service]
ExecStart=/usr/bin/pipewire -c /usr/share/pipewire/filter-chain/source-rnnoise.conf
Type=simple
Restart=on-failure
[Install]
WantedBy=pipewire.service

View File

@ -88,7 +88,10 @@ nm-connection-editor \
ntfs-3g \ ntfs-3g \
openssh \ openssh \
pavucontrol \ pavucontrol \
pulseaudio-bluetooth \ wireplumber \
pipewire-pulse \
gst-plugin-pipewire \
noise-suppression-for-voice \
raw-thumbnailer \ raw-thumbnailer \
reflector \ reflector \
shadow \ shadow \
@ -230,6 +233,7 @@ set APPSPKG bitwarden \
discord \ discord \
firefox \ firefox \
gimp \ gimp \
helvum \
nemo \ nemo \
nemo-fileroller \ nemo-fileroller \
nemo-preview \ nemo-preview \
@ -327,6 +331,8 @@ sudo systemctl enable --now systemd-timesyncd
sudo timedatectl set-ntp true sudo timedatectl set-ntp true
sudo usermod -aG video $USER
printf "\n# Enabling and starting Docker ################################################\n\n" printf "\n# Enabling and starting Docker ################################################\n\n"
sudo systemctl enable --now docker sudo systemctl enable --now docker
@ -342,14 +348,6 @@ printf "\n# Enabling Mpd as a user service #####################################
mkdir -p ~/.config/mpd/playlists mkdir -p ~/.config/mpd/playlists
systemctl --user enable --now mpd systemctl --user enable --now mpd
whiptail --yesno 'Do you want to activate the ssh server?' 8 50
if test $status -eq 0
printf "\n# Enabling ssh server #########################################################\n\n"
sudo systemctl enable --now sshd
end
sudo usermod -aG video $USER
sudo systemctl enable --now nordvpnd sudo systemctl enable --now nordvpnd
nordvpn s protocol tcp nordvpn s protocol tcp
@ -357,6 +355,16 @@ nordvpn s protocol tcp
nordvpn set notify enabled nordvpn set notify enabled
nordvpn set ipv6 enabled nordvpn set ipv6 enabled
systemctl --user enable --now pipewire-pulse.service
systemctl --user enable --now pipewire-input-filter-chain.service
whiptail --yesno 'Do you want to activate the ssh server?' 8 50
if test $status -eq 0
printf "\n# Enabling ssh server #########################################################\n\n"
sudo systemctl enable --now sshd
end
sudo ln -s ~/.local/bin/plock /usr/bin/plock sudo ln -s ~/.local/bin/plock /usr/bin/plock
mkdir -p ~/fromGIT mkdir -p ~/fromGIT

View File

@ -244,50 +244,53 @@ end
Ok, lets list all the packages that I need. First, lets begin with Ok, lets list all the packages that I need. First, lets begin with
system packages. system packages.
#+name: packages-system #+name: packages-system
| Package name | Why I need it | | Package name | Why I need it |
|------------------------+---------------------------------------------------------------------| |-----------------------------+--------------------------------------------------------------|
| acpi | Battery, power, and thermal readings | | acpi | Battery, power, and thermal readings |
| acpilight | To modify the monitors brightness | | acpilight | To modify the monitors brightness |
| bluez-firmware | Firmware for my bluetooth device | | bluez-firmware | Firmware for my bluetooth device |
| bluez-utils | To interact with bluez through custom tools | | bluez-utils | To interact with bluez through custom tools |
| bzip2 | A compression algorithm and program | | bzip2 | A compression algorithm and program |
| cpupower | Tool to examine and tune power saving related features of the CPU | | cpupower | Examine and tune power saving related features of the CPU |
| exfat-utils | Utilities for exFAT filesystems | | exfat-utils | Utilities for exFAT filesystems |
| ffmpegthumbnailer | Create thumbnails with ffmpeg | | ffmpegthumbnailer | Create thumbnails with ffmpeg |
| freeglut | A small OpenGL library | | freeglut | A small OpenGL library |
| gcc-libs | Runtime libraries for GCC | | gcc-libs | Runtime libraries for GCC |
| gdb | The GCC debugger | | gdb | The GCC debugger |
| gnome-disk-utility | To manage easily my disks and partitions | | gnome-disk-utility | To manage easily my disks and partitions |
| gnome-epub-thumbnailer | Thumbnailer for Epub files | | gnome-epub-thumbnailer | Thumbnailer for Epub files |
| i3lock-color | My screen locker | | i3lock-color | My screen locker |
| corrupter-git | A script for my script using also i3lock-color | | corrupter-git | A script for my script using also i3lock-color |
| inetutils | Common network programs | | inetutils | Common network programs |
| jfsutils | JFS utilities to interact with Android | | jfsutils | JFS utilities to interact with Android |
| jmtpfs | FUSE filesystem for the MTP protocol | | jmtpfs | FUSE filesystem for the MTP protocol |
| kitty | My current terminal emulator, works with Xorg and Wayland | | kitty | My current terminal emulator, works with Xorg and Wayland |
| logrotate | Rotate system logs automatically | | logrotate | Rotate system logs automatically |
| man-pages | Linux man pages | | man-pages | Linux man pages |
| man-db | Read the Linux man pages | | man-db | Read the Linux man pages |
| netctl | Profile based systemd network management | | netctl | Profile based systemd network management |
| network-manager-applet | System tray applet for NetworkManager | | network-manager-applet | System tray applet for NetworkManager |
| networkmanager-openvpn | Connect to OpenVPN servers with NetworkManager | | networkmanager-openvpn | Connect to OpenVPN servers with NetworkManager |
| nm-connection-editor | Manager NetworkManager connections | | nm-connection-editor | Manager NetworkManager connections |
| ntfs-3g | Utilities to access NTFS filesystems | | ntfs-3g | Utilities to access NTFS filesystems |
| openssh | SSH. Do I need to say anything more than that? | | openssh | SSH. Do I need to say anything more than that? |
| pavucontrol | Graphical interface to PulseAudio settings | | pavucontrol | Graphical interface to PulseAudio settings |
| pulseaudio-bluetooth | Bluetooth support for PulseAudio | | wireplumber | Session manager for PipeWire |
| raw-thumbnailer | thumbnailer for RAW images | | pipewire-pulse | PipeWire replacement for ~pulseaudio~ and ~pulseaudio-bluetooth~ |
| reflector | Sort pacman mirrors | | gst-plugin-pipewire | PipeWire plugin for GStreamer |
| shadow | Password & account management tools supporting shadow files and PAM | | noise-suppression-for-voice | Realtime noise suppression plugin for voice |
| sshfs | Mount remote filesystems through SSH | | raw-thumbnailer | thumbnailer for RAW images |
| usbutils | USB utilities | | reflector | Sort pacman mirrors |
| xdg-user-dirs-gtk | Creates user dirs and asks to relocalize them | | shadow | Password & account management tools |
| xfce-polkit | XFCEs policy kit | | sshfs | Mount remote filesystems through SSH |
| xidlehook | xautolock with extra features | | usbutils | USB utilities |
| xfsprogs | Access XFS filesystems | | xdg-user-dirs-gtk | Creates user dirs and asks to relocalize them |
| xorg-xinit | xorg init program | | xfce-polkit | XFCEs policy kit |
| xss-lock | Use an external program as X lock screen | | xidlehook | xautolock with extra features |
| xwallpaper | Set my Xorg sessions wallpaper | | xfsprogs | Access XFS filesystems |
| xorg-xinit | xorg init program |
| xss-lock | Use an external program as X lock screen |
| xwallpaper | Set my Xorg sessions wallpaper |
For development purposes, I need the following packages: For development purposes, I need the following packages:
#+name: packages-devel #+name: packages-devel
@ -435,6 +438,7 @@ Lets install some desktop applications too, shall we?
| discord | For messaging friends | | discord | For messaging friends |
| firefox | Because I need a good browser | | firefox | Because I need a good browser |
| gimp | GIMP Is Mbetter than Photoshop | | gimp | GIMP Is Mbetter than Photoshop |
| helvum | Pipewire patchbay |
| nemo | One of the best graphical file managers | | nemo | One of the best graphical file managers |
| nemo-fileroller | Add compression options to Nemo | | nemo-fileroller | Add compression options to Nemo |
| nemo-preview | Quick file previewer for Nemo | | nemo-preview | Quick file previewer for Nemo |
@ -455,18 +459,18 @@ installed it paru wont try to reinstall it.
(mapconcat #'identity packages " \\\n")) (mapconcat #'identity packages " \\\n"))
#+end_src #+end_src
#+RESULTS[3ba0427505dea021df862ce544adec325416ecf1]: gen-package-list #+RESULTS[53aa8b22c675edad2d6d21c0095ff233bb5e26c4]: gen-package-list
#+begin_src fish :exports none :tangle no #+begin_src fish :exports none :tangle no
set APPS bitwarden \ set APPS bitwarden \
discord \ discord \
firefox \ firefox \
gimp \ gimp \
helvum \
nemo \ nemo \
nemo-fileroller \ nemo-fileroller \
nemo-preview \ nemo-preview \
obs-studio \ obs-studio \
rofi \ rofi
sent
#+end_src #+end_src
#+name: gen-package-install #+name: gen-package-install
@ -746,6 +750,18 @@ synced.
sudo timedatectl set-ntp true sudo timedatectl set-ntp true
#+END_SRC #+END_SRC
*** Acpilight
:PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794
:END:
~acpilight~ is our utility managing the brightness of our screen. There
is actually no service to enable here, but we must ensure the user is
part of the ~video~ group so we can modify the brightness of our screen
without using ~sudo~.
#+BEGIN_SRC fish
sudo usermod -aG video $USER
#+END_SRC
*** Docker *** Docker
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Docker-305e8309 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Docker-305e8309
@ -798,32 +814,6 @@ mkdir -p ~/.config/mpd/playlists
systemctl --user enable --now mpd systemctl --user enable --now mpd
#+END_SRC #+END_SRC
*** SSH server
:PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-SSH_server-204f5997
:END:
Maybe we want to activate an SSH server on our machine. If so, we can enable it.
Lets ask the question.
#+BEGIN_SRC fish
whiptail --yesno 'Do you want to activate the ssh server?' 8 50
if test $status -eq 0
printf "\n# Enabling ssh server #########################################################\n\n"
sudo systemctl enable --now sshd
end
#+END_SRC
*** Acpilight
:PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794
:END:
~acpilight~ is our utility managing the brightness of our screen. There
is actually no service to enable here, but we must ensure the user is
part of the ~video~ group so we can modify the brightness of our screen
without using ~sudo~.
#+BEGIN_SRC fish
sudo usermod -aG video $USER
#+END_SRC
*** NordVPN *** NordVPN
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-NordVPN-75c1bd88 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-NordVPN-75c1bd88
@ -874,6 +864,46 @@ nordvpn set notify enabled
nordvpn set ipv6 enabled nordvpn set ipv6 enabled
#+end_src #+end_src
*** PipeWire
:PROPERTIES:
:CUSTOM_ID: Execute-bootstrap-Enable-some-services-PipeWire-sihc11b0mdj0
:END:
PipeWire is a replacement for PulseAudio, ALSA and the likes, and it
is /*much*/ better in terms of security and performance. However, unlike
PulseAudio, Pipewire is a user service that needs to be enabled per
user.
#+begin_src fish
systemctl --user enable --now pipewire-pulse.service
#+end_src
I also installed ~noise-suppression-for-voice~ which is a plugin usable
by PipeWire to remove all noise the microphone might record save for
the voice. It is damn effective, and it can be activated as a user
service! In fact, I have in my dotfiles the service saved, so lets
activate it right away:
#+begin_src fish
systemctl --user enable --now pipewire-input-filter-chain.service
#+end_src
Just make sure afterwards the microphone is redirected to the noise
canceling source. The same source should be your input device where
you want to use your microphone. The only downside is this is ony a
mono input, but it shouldnt matter for most people.
*** SSH server
:PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-SSH_server-204f5997
:END:
Maybe we want to activate an SSH server on our machine. If so, we can enable it.
Lets ask the question.
#+BEGIN_SRC fish
whiptail --yesno 'Do you want to activate the ssh server?' 8 50
if test $status -eq 0
printf "\n# Enabling ssh server #########################################################\n\n"
sudo systemctl enable --now sshd
end
#+END_SRC
** Symlink some system config files ** Symlink some system config files
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175 :CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175