Audio que vuelve solo; fuera sshd, OBS y Nix

- .xinitrc: pipewire, wireplumber y pipewire-pulse en un bucle mientras
  X siga abierto; si wireplumber se cae, vuelve al segundo en vez de
  dejar el audio en "Dummy Output".
- sshd y nix-daemon fuera de los servicios.
- Fuera obs y qt6ct (qt5ct se queda para hplip) y nix con webcord
  (Discord va en Firefox); quitar borra también /nix y el perfil.
- .bashrc sin lo de Nix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5v1qWDwgkaVM5kjVHGGh8
This commit is contained in:
Alejandro Guerrero 2026-09-28 16:17:58 +02:00
parent 20cb3ae4a6
commit 0e90f6029e
Signed by: alejandrogs73
GPG key ID: 1CFF10953BEE333C
7 changed files with 64 additions and 63 deletions

View file

@ -37,13 +37,14 @@ for example) and repeated safely:
editing `~/.bashrc` edits the repo. Links to files deleted from the repo
are removed. It also creates the user folders and
sets `~/.ssh` to 700.
4. `gtk`: builds the [Everforest GTK](https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme)
theme (green, dark, medium palette) in `~/.themes` from a pinned commit,
links it for GTK 4 apps and makes the Papirus folders green. Icons are
Papirus-Dark everywhere. Qt 5 and Qt 6 apps use qt5ct/qt6ct
(`QT_QPA_PLATFORMTHEME` in `.xinitrc`) with the Fusion style and an
Everforest palette (`home/.config/qt*ct/`). If a `papirus-icon-theme`
update turns the folders blue again, just run this step again.
4. `gtk`: builds the [Everforest
GTK](https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme) theme
(green, dark, medium palette) in `~/.themes` from a pinned commit, links it
for GTK 4 apps and makes the Papirus folders green. Icons are Papirus-Dark
everywhere. Qt 5 apps (the hplip windows) use qt5ct (`QT_QPA_PLATFORMTHEME`
in `.xinitrc`) with the Fusion style and an Everforest palette
(`home/.config/qt5ct/`). If a `papirus-icon-theme` update turns the folders
blue again, just run this step again.
5. `gnupg`: for after copying `~/.gnupg` by hand (from a USB stick, for
example). It fixes the permissions, sets `pinentry-dmenu` with the dmenu
colours (`pinentry-curses` on a tty: `home/.local/bin/pinentry-menu`
@ -56,11 +57,12 @@ for example) and repeated safely:
save networks, enables the runit services (dbus, turnstiled,
wpa_supplicant, dhcpcd, bluetoothd, acpid, openntpd, tlp, automontaje,
cupsd), removes NetworkManager, elogind, chronyd, avahi-daemon (the printer
has a fixed IP) and polkitd (if something asks for polkit, like libvirt,
D-Bus starts it on its own) and adds the user to the audio, video, input,
network, bluetooth, lpadmin (printer management) and `_pipewire` (realtime
priority for audio without rtkit) groups. `doas.conf` is checked with `doas
-C` before it is installed with mode 400.
has a fixed IP), sshd (nobody SSHes into the laptop), nix-daemon and
polkitd (if something asks for polkit, like libvirt, D-Bus starts it on its
own) and adds the user to the audio, video, input, network, bluetooth,
lpadmin (printer management) and `_pipewire` (realtime priority for audio
without rtkit) groups. `doas.conf` is checked with `doas -C` before it is
installed with mode 400.
7. `quitar` (remove): uninstalls what the repo no longer uses because
something else replaces it: sudo (doas), feh (xwallpaper and nsxiv),
gammastep (sct), autorandr (`pantallas`), blueman and pavucontrol (the
@ -68,16 +70,15 @@ for example) and repeated safely:
(mpv), btop, NetworkManager and tlp-rdw (wpa_supplicant, dhcpcd and the
`wifi` script), rtkit, elogind (turnstile), xss-lock (`inactivo`, with
xssstate), chrony (openntpd), avahi and nss-mdns (also removed from
`/etc/nsswitch.conf`) and nemo with upower (yazi; gvfs and udisks2 go with
nemo). sudo can be removed thanks to `sistema/etc/xbps.d/sin-sudo.conf`
`/etc/nsswitch.conf`), nemo with upower (yazi; gvfs and udisks2 go with
nemo), obs and qt6ct, and nix (webcord; Discord runs in Firefox). Once the
nix package is gone, it also deletes `/nix` and the user's Nix profile.
sudo can be removed thanks to `sistema/etc/xbps.d/sin-sudo.conf`
(base-system depends on it), and it is only removed once `/etc/doas.conf`
is installed.
Afterwards, log out and back in (for the groups) and run `startx`.
Nix is not installed: the little that comes from it (webcord) is installed by
hand.
## Without elogind
elogind is systemd's logind on its own, and it is not needed here:
@ -189,6 +190,9 @@ preserveonrestart patches).
(the laptop one on the left and as primary) at startup and whenever one is
plugged or unplugged (udev rule in `sistema/`), then repaints the
wallpaper with `xwallpaper`.
- Audio: `.xinitrc` runs pipewire, wireplumber and pipewire-pulse in a loop,
so if one of them dies it comes back a second later (without wireplumber
everything goes to "Dummy Output").
- WiFi: `wifi` scans with `wpa_cli` and lists the networks in dmenu by
signal (`*` is the current one). For a new network it asks for the
password (hidden while typing) and saves it in

View file

@ -33,12 +33,13 @@ Hace siete pasos, que también se pueden lanzar por separado
editar el repo. Los enlaces a archivos que se han borrado del repo se
quitan. También crea las carpetas del usuario y deja `~/.ssh` en
700.
4. `gtk`: compila el tema [Everforest GTK](https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme)
(verde, oscuro, paleta medium) en `~/.themes`, en una versión fija, y lo
enlaza para las apps de GTK 4, y pone verdes las carpetas de Papirus. Los
iconos son Papirus-Dark en todo. Las apps Qt 5 y Qt 6 usan qt5ct/qt6ct
4. `gtk`: compila el tema [Everforest
GTK](https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme) (verde,
oscuro, paleta medium) en `~/.themes`, en una versión fija, y lo enlaza
para las apps de GTK 4, y pone verdes las carpetas de Papirus. Los iconos
son Papirus-Dark en todo. Las apps Qt 5 (las ventanas de hplip) usan qt5ct
(`QT_QPA_PLATFORMTHEME` en `.xinitrc`) con el estilo Fusion y una paleta
Everforest (`home/.config/qt*ct/`). Si una actualización de
Everforest (`home/.config/qt5ct/`). Si una actualización de
`papirus-icon-theme` devuelve las carpetas a azul, basta con repetir este
paso.
5. `gnupg`: para después de copiar `~/.gnupg` a mano (de un USB, por
@ -52,27 +53,28 @@ Hace siete pasos, que también se pueden lanzar por separado
los de wheel usen `wpa_cli` sin root y guarden redes, activa los servicios
de runit (dbus, turnstiled, wpa_supplicant, dhcpcd, bluetoothd, acpid,
openntpd, tlp, automontaje, cupsd), quita NetworkManager, elogind, chronyd,
avahi-daemon (la impresora va por IP fija) y polkitd (si algo pide polkit,
como libvirt, D-Bus lo arranca solo) y añade el usuario a los grupos audio,
video, input, network, bluetooth, lpadmin (para gestionar impresoras) y
`_pipewire` (prioridad de tiempo real para el audio sin rtkit). `doas.conf`
se valida con `doas -C` antes de instalarlo con modo 400.
avahi-daemon (la impresora va por IP fija), sshd (al portátil no se entra
por SSH), nix-daemon y polkitd (si algo pide polkit, como libvirt, D-Bus lo
arranca solo) y añade el usuario a los grupos audio, video, input, network,
bluetooth, lpadmin (para gestionar impresoras) y `_pipewire` (prioridad de
tiempo real para el audio sin rtkit). `doas.conf` se valida con `doas -C`
antes de instalarlo con modo 400.
7. `quitar`: desinstala lo que el repo ya no usa porque lo sustituye otra
cosa: sudo (doas), feh (xwallpaper y nsxiv), gammastep (sct), autorandr
(`pantallas`), blueman y pavucontrol (scripts `bluetooth` y `volumen`),
pinentry-gtk (pinentry-dmenu), vlc (mpv), btop, NetworkManager y tlp-rdw
(wpa_supplicant, dhcpcd y el script `wifi`), rtkit, elogind (turnstile),
xss-lock (`inactivo`, con xssstate), chrony (openntpd), avahi y nss-mdns
(también los quita de `/etc/nsswitch.conf`) y nemo con upower (yazi; con
nemo se van gvfs y udisks2). sudo se puede quitar gracias a
`sistema/etc/xbps.d/sin-sudo.conf` (base-system depende de él), y solo se
quita si `/etc/doas.conf` ya está instalado.
(también los quita de `/etc/nsswitch.conf`), nemo con upower (yazi; con
nemo se van gvfs y udisks2), obs y qt6ct, y nix (webcord; Discord va en
Firefox). Sin el paquete nix, borra también `/nix` y el perfil de Nix del
usuario. sudo se puede quitar gracias a `sistema/etc/xbps.d/sin-sudo.conf`
(base-system depende de él), y solo se quita si `/etc/doas.conf` ya está
instalado.
Después hay que cerrar sesión y volver a entrar (por los grupos) y lanzar
`startx`.
Nix no se instala: lo poco que viene de ahí (webcord) se instala a mano.
## Sin elogind
elogind es el logind de systemd por separado, y aquí sobra:
@ -186,6 +188,9 @@ ventanas (parches restartsig y preserveonrestart).
`xrandr` (la del portátil a la izquierda y como principal) al arrancar y
cada vez que se conecta o desconecta una (regla de udev en `sistema/`), y
vuelve a pintar el fondo con `xwallpaper`.
- Audio: `.xinitrc` lanza pipewire, wireplumber y pipewire-pulse en un bucle,
así que si alguno se cae vuelve solo al segundo (sin wireplumber todo sale
por "Dummy Output").
- WiFi: `wifi` busca redes con `wpa_cli` y las enseña en dmenu por señal
(`*` la actual). Si la red es nueva pide la contraseña (no se ve al
escribirla) y la guarda en `/etc/wpa_supplicant/wpa_supplicant.conf` solo

View file

@ -16,11 +16,6 @@ export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1
# Cargar Nix (Asegura que los comandos de Nix funcionen si entras sin X11)
if [ -e /etc/profile.d/nix.sh ]; then
. /etc/profile.d/nix.sh
fi
# Editor por defecto
export EDITOR="nvim" # Cambia a "vim" si te gusta más sufrir/disfrutar
@ -93,6 +88,3 @@ ex() {
esac
done
}
# Forzar IPv4 en Nix (IPv6 del sistema está roto)
export NIX_CURL_FLAGS=-4

View file

@ -1,6 +0,0 @@
[ColorScheme]
# Everforest dark medium. Orden de los colores (QPalette):
# WindowText, Button, Light, Midlight, Dark, Mid, Text, BrightText, ButtonText, Base, Window, Shadow, Highlight, HighlightedText, Link, LinkVisited, AlternateBase, NoRole, ToolTipBase, ToolTipText, PlaceholderText
active_colors=#ffd3c6aa, #ff343f44, #ff4f585e, #ff475258, #ff232a2e, #ff3d484d, #ffd3c6aa, #ffe67e80, #ffd3c6aa, #ff232a2e, #ff2d353b, #ff1e2326, #ffa7c080, #ff2d353b, #ff7fbbb3, #ffd699b6, #ff2d353b, #ff2d353b, #ff3d484d, #ffd3c6aa, #ff859289
disabled_colors=#ff7a8478, #ff343f44, #ff4f585e, #ff475258, #ff232a2e, #ff3d484d, #ff7a8478, #ffe67e80, #ff7a8478, #ff232a2e, #ff2d353b, #ff1e2326, #ff475258, #ff7a8478, #ff7fbbb3, #ffd699b6, #ff2d353b, #ff2d353b, #ff3d484d, #ffd3c6aa, #ff859289
inactive_colors=#ffd3c6aa, #ff343f44, #ff4f585e, #ff475258, #ff232a2e, #ff3d484d, #ffd3c6aa, #ffe67e80, #ffd3c6aa, #ff232a2e, #ff2d353b, #ff1e2326, #ffa7c080, #ff2d353b, #ff7fbbb3, #ffd699b6, #ff2d353b, #ff2d353b, #ff3d484d, #ffd3c6aa, #ff859289

View file

@ -1,6 +0,0 @@
[Appearance]
color_scheme_path=$HOME/.config/qt6ct/colors/Everforest.conf
custom_palette=true
icon_theme=Papirus-Dark
standard_dialogs=default
style=Fusion

View file

@ -13,8 +13,7 @@ if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
exec dbus-run-session -- sh "$HOME/.xinitrc"
fi
# Apps Qt con el tema de qt5ct/qt6ct (Everforest, Papirus). El plugin de
# qt6ct también responde a "qt5ct", así que vale para Qt 5 y Qt 6.
# Apps Qt 5 (las ventanas de hplip) con el tema de qt5ct (Everforest, Papirus).
export QT_QPA_PLATFORMTHEME=qt5ct
# Teclado y pantallas primero. pantallas (sistema/usr/local/bin) las pone en
@ -23,9 +22,12 @@ export QT_QPA_PLATFORMTHEME=qt5ct
setxkbmap es
pantallas
pipewire &
wireplumber &
pipewire-pulse &
# Audio. Si alguno se cae, vuelve solo al segundo (sin wireplumber no hay
# ni altavoces ni bluetooth: todo sale por "Dummy Output"). Al cerrar X se
# acaba el bucle.
for p in pipewire wireplumber pipewire-pulse; do
while xset q >/dev/null 2>&1; do "$p"; sleep 1; done &
done
dunst &
picom &

View file

@ -23,7 +23,7 @@ PAQUETES="
wpa_supplicant dhcpcd bluez acpid openntpd tlp
cups cups-filters hplip
font-firacode nerd-fonts-symbols-ttf papirus-icon-theme papirus-folders
sassc gnome-themes-extra qt5ct qt6ct
sassc gnome-themes-extra qt5ct
opendoas gnupg pinentry-dmenu
firefox thunderbird mpv neovim git fuse-sshfs unzip
@ -38,8 +38,9 @@ SERVICIOS="dbus turnstiled wpa_supplicant dhcpcd bluetoothd acpid openntpd tlp a
# La red la llevan wpa_supplicant y dhcpcd. polkitd no hace falta como
# servicio: si algo lo pide (libvirt), D-Bus lo arranca. turnstiled sustituye
# a elogind y openntpd a chronyd. avahi-daemon (mDNS) no hace falta: la
# impresora va por IP fija.
SERVICIOS_FUERA="NetworkManager polkitd elogind chronyd avahi-daemon"
# impresora va por IP fija. Al portátil no se entra por SSH (sshd) y Nix
# (nix-daemon) ya no se usa.
SERVICIOS_FUERA="NetworkManager polkitd elogind chronyd avahi-daemon sshd nix-daemon"
# _pipewire da prioridad de tiempo real al audio sin rtkit
# (/etc/security/limits.d/25-pw-rlimits.conf, de pipewire).
GRUPOS="audio video input network bluetooth lpadmin _pipewire"
@ -50,11 +51,12 @@ GRUPOS="audio video input network bluetooth lpadmin _pipewire"
# _pipewire), elogind (turnstile; Xorg arranca como root con Xorg.wrap y la
# tapa y los botones ya los lleva acpid), xss-lock (inactivo, con xssstate),
# chrony (openntpd), avahi y nss-mdns (nada los usa) y nemo con upower (yazi;
# con nemo se van gvfs y udisks2).
# con nemo se van gvfs y udisks2), obs y qt6ct, y nix (webcord: Discord va en
# Firefox).
QUITAR="
sudo feh gammastep autorandr blueman pavucontrol pinentry-gtk
gtk-engine-murrine vlc btop NetworkManager tlp-rdw rtkit elogind
xss-lock chrony avahi nss-mdns nemo upower
xss-lock chrony avahi nss-mdns nemo upower obs qt6ct nix
"
msg() { printf '\033[1;32m==>\033[0m %s\n' "$*"; }
@ -270,6 +272,14 @@ quitar() {
/etc/nsswitch.conf
fi
# Sin el paquete nix, su almacén (/nix) y los enlaces del perfil sobran
if ! xbps-query nix >/dev/null 2>&1 && [ -d /nix ]; then
msg "Borrando /nix y el perfil de Nix"
root rm -rf /nix
rm -rf "$HOME/.nix-profile" "$HOME/.nix-defexpr" "$HOME/.nix-channels" \
"$HOME/.local/state/nix" "$HOME/.cache/nix"
fi
# Lo que puso aquí una versión anterior de sistema/ para elogind
if [ -e /etc/elogind/logind.conf.d/10-acpid.conf ]; then
root rm /etc/elogind/logind.conf.d/10-acpid.conf