From: Christian Heller Date: Tue, 22 Apr 2025 03:36:07 +0000 (+0200) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/ledger?a=commitdiff_plain;h=78a610edc3225acbadfd8b21db34fcb73a92d342;p=config Fix. --- diff --git a/bookworm/__etc/all/apt/apt.conf.d/99_minimize_dependencies b/bookworm/__etc/all/apt/apt.conf.d/99_minimize_dependencies deleted file mode 100644 index 4aaef79..0000000 --- a/bookworm/__etc/all/apt/apt.conf.d/99_minimize_dependencies +++ /dev/null @@ -1,4 +0,0 @@ -APT::AutoRemove::RecommendsImportant "false"; -APT::AutoRemove::SuggestsImportant "false"; -APT::Install-Recommends "false"; -APT::Install-Suggests "false"; diff --git a/bookworm/__etc/all/apt/sources.list b/bookworm/__etc/all/apt/sources.list deleted file mode 100644 index 72b0ffb..0000000 --- a/bookworm/__etc/all/apt/sources.list +++ /dev/null @@ -1,4 +0,0 @@ -deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware -deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware -deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware -deb http://ftp.debian.org/debian bookworm-backports main contrib non-free non-free-firmware diff --git a/bookworm/__etc/caddy/caddy/Caddyfile b/bookworm/__etc/caddy/caddy/Caddyfile deleted file mode 100644 index 1eddd83..0000000 --- a/bookworm/__etc/caddy/caddy/Caddyfile +++ /dev/null @@ -1,7 +0,0 @@ -REPLACE_WITH_FQDN { - root * /var/www/dump - basicauth /private/* { - user REPLACE_WITH_HASH - } - file_server browse -} diff --git a/bookworm/__etc/catgirl/systemd/system/catgirl.service b/bookworm/__etc/catgirl/systemd/system/catgirl.service deleted file mode 100644 index 38d9fd1..0000000 --- a/bookworm/__etc/catgirl/systemd/system/catgirl.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=catgirl in tmux Session -After=network.target - -[Service] -Type=forking -User=plom -ExecStart=/usr/bin/tmux new-session -d -s catgirl_tmux /usr/bin/catgirl libera -ExecStop=/usr/bin/tmux kill-session -t catgirl_tmux -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target - diff --git a/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.service b/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.service deleted file mode 100644 index 3f22c84..0000000 --- a/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Run script for encrypting catgirl logs. - -[Service] -Type=oneshot -User=plom -ExecStart=/bin/sh -cl 'encrypt_catgirl_logs' - diff --git a/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.timer b/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.timer deleted file mode 100644 index c650376..0000000 --- a/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Run service for encrypting catgirl logs once every day. - -[Timer] -OnCalendar=*-*-* 01:00:00 - -[Install] -WantedBy=timers.target - diff --git a/bookworm/__etc/seedbox/systemd/system/rtorrent.service b/bookworm/__etc/seedbox/systemd/system/rtorrent.service deleted file mode 100644 index 9b98821..0000000 --- a/bookworm/__etc/seedbox/systemd/system/rtorrent.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=rtorrent session -After=network.target - -[Service] -Type=simple -User=plom -Group=plom -WorkingDirectory=/home/plom -ExecStartPre=-/bin/rm -f /home/plom/session/rtorrent.lock -ExecStart=/usr/bin/tmux new-session -d -s rtorrent_tmux /usr/bin/rtorrent -ExecStop=/usr/bin/tmux kill-session -t rtorrent_tmux -Restart=on-failure -RestartSec=3 - -[Install] -WantedBy=multi-user.target diff --git a/bookworm/__etc/server/nftables.conf b/bookworm/__etc/server/nftables.conf deleted file mode 100755 index 96dad3e..0000000 --- a/bookworm/__etc/server/nftables.conf +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/sbin/nft -f - -flush ruleset - -table inet filter { - chain input { - type filter \ - hook input \ - priority 0; - policy drop; - iif lo \ - accept \ - comment "accept localhost traffic"; - ct state invalid \ - drop \ - comment "drop invalid connections"; - ct state established, related \ - accept \ - comment "accept traffic originated from us"; - tcp dport 22 \ - accept \ - comment "accept SSH on default port"; - tcp dport 80 \ - accept \ - comment "accept HTTP on default port"; - tcp dport 443 \ - accept \ - comment "accept HTTPS on default port"; - ip protocol icmp \ - icmp type echo-request \ - accept \ - comment "accept ICMP for pinging"; - } - chain forward { - type filter \ - hook forward \ - priority 0; - policy drop; - } - chain output { - type filter \ - hook output \ - priority 0; - policy accept; - } -} diff --git a/bookworm/__etc/server/ssh/sshd_config b/bookworm/__etc/server/ssh/sshd_config deleted file mode 100644 index e952cb3..0000000 --- a/bookworm/__etc/server/ssh/sshd_config +++ /dev/null @@ -1,123 +0,0 @@ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options override the -# default value. - -Include /etc/ssh/sshd_config.d/*.conf - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Ciphers and keying -#RekeyLimit default none - -# Logging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -#PermitRootLogin prohibit-password -PermitRootLogin no # plomlompom's security rule -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#PubkeyAuthentication yes - -# Expect .ssh/authorized_keys2 to be disregarded by default in future. -#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -PasswordAuthentication no -#PermitEmptyPasswords no - -# Change to yes to enable challenge-response passwords (beware issues with -# some PAM modules and threads) -KbdInteractiveAuthentication no - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes -#GSSAPIStrictAcceptorCheck yes -#GSSAPIKeyExchange no - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the KbdInteractiveAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via KbdInteractiveAuthentication may bypass -# the setting of "PermitRootLogin prohibit-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and KbdInteractiveAuthentication to 'no'. -UsePAM yes - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -X11Forwarding yes -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -PrintMotd no -#PrintLastLog yes -#TCPKeepAlive yes -#PermitUserEnvironment no -#Compression delayed -ClientAliveInterval 15 -#ClientAliveCountMax 3 -#UseDNS no -#PidFile /run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# Allow client to pass locale environment variables -AcceptEnv LANG LC_* - -# override default of no subsystems -Subsystem sftp /usr/lib/openssh/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server diff --git a/bookworm/__home/all/.bash_profile b/bookworm/__home/all/.bash_profile deleted file mode 100644 index 316cf19..0000000 --- a/bookworm/__home/all/.bash_profile +++ /dev/null @@ -1,8 +0,0 @@ -# ~/.bash_profile, if it exists, is sourced by Bash for all login shells, -# instead of ~/.profile -# -# While I prefer using ~/.profile, I provide ~/.bash_profile because some -# applications write to it even if it does not previously exist, which -# deactivates ~/.profile if not explicitly sourced from within here. -. "${HOME}/.profile" - diff --git a/bookworm/__home/all/.bashrc b/bookworm/__home/all/.bashrc deleted file mode 100644 index e748315..0000000 --- a/bookworm/__home/all/.bashrc +++ /dev/null @@ -1,29 +0,0 @@ -# ~/.bashrc is sourced by Bash for any interactive shells. - -# Use vim as default editor for anything. -export VISUAL=vim -export EDITOR="${VISUAL}" - -# Some helpful aliases. -alias curlpost='curl -H "Content-Type: application/json" -X POST' -alias ls="ls --color=auto" - -# Colored prompt with username, hostname, date/time, directory. -COLOR_NUMBER=7 # default to white -COLOR_NUMBER_FILE="${HOME}/.shell_prompt_color" -[ -f "${COLOR_NUMBER_FILE}" ] && COLOR_NUMBER=`cat "${COLOR_NUMBER_FILE}"` -tput_color="$(tput setaf "${COLOR_NUMBER}")$(tput bold)" -tput_reset="$(tput sgr0)" -# Bash confuses the line length when not told to not count escape sequences. -if [ -n "${BASH}" ]; then - tput_color="\[$tput_color\]" - tput_reset="\[$tput_reset\]" -fi -PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ ${tput_reset}" -PS2="${tput_color}> ${tput_reset}" -PS3="${tput_color}select: ${tput_reset}" -PS4="${tput_color}+ ${tput_reset}" - -# include others -. "${HOME}/.plomlib/file_dot_variants" -file_dot_variants "${HOME}/\.bashrc" diff --git a/bookworm/__home/all/.local/bin/lib b/bookworm/__home/all/.local/bin/lib deleted file mode 120000 index 8009c2a..0000000 --- a/bookworm/__home/all/.local/bin/lib +++ /dev/null @@ -1 +0,0 @@ -../../.plomlib \ No newline at end of file diff --git a/bookworm/__home/all/.plomlib/file_dot_variants b/bookworm/__home/all/.plomlib/file_dot_variants deleted file mode 100644 index 1c1bf69..0000000 --- a/bookworm/__home/all/.plomlib/file_dot_variants +++ /dev/null @@ -1,7 +0,0 @@ -file_dot_variants() { - for FILE in ${1}\.*; do - if [ -f "${FILE}" ]; then - . "${FILE}" - fi - done -} diff --git a/bookworm/__home/all/.profile b/bookworm/__home/all/.profile deleted file mode 100644 index 51acedd..0000000 --- a/bookworm/__home/all/.profile +++ /dev/null @@ -1,20 +0,0 @@ -# ~/.profile is sourced on login, with its exports inherited by all processes -# started below it under the same login, i.e. it has a very deep effect, but -# changes to it only apply to new login sessions (compare to e.g. ~/.bashrc -# which by is sourced anew for every new interactive Bash, login or not). -# -# Notably this makes ~/.profile (outside its optional sourcing of ~/.bashrc) -# useful for providing environment variables to non-shell applications started -# within a login session. -PATH_BASHRC="${HOME}/.bashrc" -[ -n "${BASH_VERSION}" -a -f "${PATH_BASHRC}" ] && . "${PATH_BASHRC}" - -PATH_LOCAL_BIN="${HOME}/.local/bin" -[ -d "${PATH_LOCAL_BIN}" ] && PATH="${PATH_LOCAL_BIN}:${PATH}" - -# local changes to this shell variable otherwise will get lost -export PATH - -# include others -. "${HOME}/.plomlib/file_dot_variants" -file_dot_variants "${HOME}/\.profile" diff --git a/bookworm/__home/catgirl/.config/catgirl/libera b/bookworm/__home/catgirl/.config/catgirl/libera deleted file mode 100644 index f27baa7..0000000 --- a/bookworm/__home/catgirl/.config/catgirl/libera +++ /dev/null @@ -1,4 +0,0 @@ -host = irc.libera.chat -join = #plomtest -sasl-plain = plomtest:REPLACE_WITH_IRC_PASSWORD -log diff --git a/bookworm/__home/catgirl/.local/bin/encrypt_catgirl_logs b/bookworm/__home/catgirl/.local/bin/encrypt_catgirl_logs deleted file mode 100755 index e6da887..0000000 --- a/bookworm/__home/catgirl/.local/bin/encrypt_catgirl_logs +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -set -e -cd $(dirname "$0") -. lib/expect_n_args - -expect_n_args 0 0 '' - -PATH_LOGS="${HOME}/.local/share/log" -PATH_ENCRYPTED_LOGS="${HOME}/logs_encrypted" -PATH_ENCRYPTION_KEY="${HOME}/.plomlib/encrypt_with.pub" - -TODAY="$(date +'%Y-%m-%d')" -set +e -PATHS_LOGFILES="$(ls ${PATH_LOGS}/*/*/*.log 2> /dev/null)" -set -e -if [ -z "${PATHS_LOGFILES}" ]; then - echo "No log files present, so nothing to do." - exit 0 -fi -for _PATH_LOGFILE in ${PATHS_LOGFILES}; do - _FILENAME=$(basename "${_PATH_LOGFILE}") - _DATE_OF_LOG=$(echo "${_FILENAME}" | cut -d'.' -f1) - _DIRNAME=$(dirname "${_PATH_LOGFILE}") - _WINDOW_OF_LOG=$(basename "${_DIRNAME}") - _DIRNAME=$(dirname "${_DIRNAME}") - _NETWORK_OF_LOG=$(basename "${_DIRNAME}") - if ! [ "${_DATE_OF_LOG}" '<' "${TODAY}" ]; then - echo "${_PATH_LOGFILE} too young, ignoring." - else - echo "${_PATH_LOGFILE}: encrypting to ${PATH_ENCRYPTED_LOGS}, deleting original …" - _PATH_TARGET="${PATH_ENCRYPTED_LOGS}/${_NETWORK_OF_LOG}/${_WINDOW_OF_LOG}" - mkdir -p "${_PATH_TARGET}" - age -R "${PATH_ENCRYPTION_KEY}" "${_PATH_LOGFILE}" > "${_PATH_TARGET}/${_FILENAME}.age" - rm "${_PATH_LOGFILE}" - fi -done diff --git a/bookworm/__home/catgirl/.local/share/catgirl/KILL_ME b/bookworm/__home/catgirl/.local/share/catgirl/KILL_ME deleted file mode 100644 index e69de29..0000000 diff --git a/bookworm/__home/catgirl/.plomlib/abort b/bookworm/__home/catgirl/.plomlib/abort deleted file mode 120000 index 3afad55..0000000 --- a/bookworm/__home/catgirl/.plomlib/abort +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/abort \ No newline at end of file diff --git a/bookworm/__home/catgirl/.plomlib/constants_user b/bookworm/__home/catgirl/.plomlib/constants_user deleted file mode 120000 index 79ec36f..0000000 --- a/bookworm/__home/catgirl/.plomlib/constants_user +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/constants_user \ No newline at end of file diff --git a/bookworm/__home/catgirl/.plomlib/encrypt_with.pub b/bookworm/__home/catgirl/.plomlib/encrypt_with.pub deleted file mode 100644 index ddd5ba1..0000000 --- a/bookworm/__home/catgirl/.plomlib/encrypt_with.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAoMa288S7iHnw8lEaSQTTK8pSJwBEWCCyPJF7zewbXrgGoHHXAYD88AJFrULBivTk6HIVpx+Dc0fdhheXr3yl8XGo57l7XTVd1xz2USxaPXfWHEz5mAtJVM4MJ7MjQ5eNkCgrJaOWZ1SLnSS/+dF3KGYs1BK7piIKFk/5AKQmX+0R3STxNlLlEOWG03224409VNliMKFhbfjszPJyaKDFKt4tnG12YgEZ0Zx2LbAfJZzFdkxb2qzcdb09vRHOEZgtFPszohVETaBtocl3mEPHRjwXzhE6fz/jzMHc+JZDViQONobvgJ7weVU7dnv8zmiobFuyOEb4uyAE1yugvBypPQ== diff --git a/bookworm/__home/catgirl/.plomlib/expect_n_args b/bookworm/__home/catgirl/.plomlib/expect_n_args deleted file mode 120000 index a0925a1..0000000 --- a/bookworm/__home/catgirl/.plomlib/expect_n_args +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/expect_n_args \ No newline at end of file diff --git a/bookworm/__home/root/.shell_prompt_color b/bookworm/__home/root/.shell_prompt_color deleted file mode 100644 index d00491f..0000000 --- a/bookworm/__home/root/.shell_prompt_color +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/bookworm/__home/seedbox/.rtorrent.rc b/bookworm/__home/seedbox/.rtorrent.rc deleted file mode 100644 index 2513748..0000000 --- a/bookworm/__home/seedbox/.rtorrent.rc +++ /dev/null @@ -1,11 +0,0 @@ -# where to write downloads into -directory.default.set = ~/downloads - -# rtorrent's memory -session.path.set = ~/session - -# security and paranoia -dht.mode.set = disable -protocol.pex.set = no -protocol.encryption.set = require,require_RC4,allow_incoming,try_outgoing - diff --git a/bookworm/__home/seedbox/downloads/KILL_ME b/bookworm/__home/seedbox/downloads/KILL_ME deleted file mode 100644 index e69de29..0000000 diff --git a/bookworm/__home/seedbox/seedbox/KILL_ME b/bookworm/__home/seedbox/seedbox/KILL_ME deleted file mode 100644 index e69de29..0000000 diff --git a/bookworm/aptmark/caddy b/bookworm/aptmark/caddy deleted file mode 100644 index aeb9382..0000000 --- a/bookworm/aptmark/caddy +++ /dev/null @@ -1,2 +0,0 @@ -caddy -# diff --git a/bookworm/aptmark/server b/bookworm/aptmark/server index cefa289..3ab738f 100644 --- a/bookworm/aptmark/server +++ b/bookworm/aptmark/server @@ -4,6 +4,8 @@ openssh-server nftables # so every server can store borg backups borgbackup +# so every server can serve some webspace +caddy # for playing nicely with ssh sessions via the foot terminal foot-terminfo # diff --git a/bookworm/copy/all/etc/hosts b/bookworm/copy/all/etc/hosts index 8937d24..a6bbbe4 100644 --- a/bookworm/copy/all/etc/hosts +++ b/bookworm/copy/all/etc/hosts @@ -4,9 +4,6 @@ # Debian wants this for some cases where software wants a non-loopback address # but we still don't want to rely on external DNS -# (NB: replacement scripts may, for desktop systems without FQDN, before -# actually replacing REPLACE_WITH_HOSTNAME, replace "REPLACE_WITH FQDN" with -# "REPLACE_WITH_HOSTNAME.local REPLACE_WITH_HOSTNAME.localdomain") 127.0.1.1 REPLACE_WITH_FQDN REPLACE_WITH_HOSTNAME # If we *do* have an external FQDN … diff --git a/bookworm/copy/caddy/etc/caddy/Caddyfile b/bookworm/copy/caddy/etc/caddy/Caddyfile deleted file mode 100644 index 1eddd83..0000000 --- a/bookworm/copy/caddy/etc/caddy/Caddyfile +++ /dev/null @@ -1,7 +0,0 @@ -REPLACE_WITH_FQDN { - root * /var/www/dump - basicauth /private/* { - user REPLACE_WITH_HASH - } - file_server browse -} diff --git a/bookworm/copy/server/etc/caddy/Caddyfile b/bookworm/copy/server/etc/caddy/Caddyfile new file mode 100644 index 0000000..1eddd83 --- /dev/null +++ b/bookworm/copy/server/etc/caddy/Caddyfile @@ -0,0 +1,7 @@ +REPLACE_WITH_FQDN { + root * /var/www/dump + basicauth /private/* { + user REPLACE_WITH_HASH + } + file_server browse +} diff --git a/bookworm/scripts/lib/set_hostname_and_hosts b/bookworm/scripts/lib/set_hostname_and_hosts new file mode 100644 index 0000000..65a51a4 --- /dev/null +++ b/bookworm/scripts/lib/set_hostname_and_hosts @@ -0,0 +1,21 @@ +. lib/constants_etc # PATH_ETC + +set_hostname_and_hosts() { + _HOSTNAME="$1" + _FQDN="$2" + _EXTERNAL_IP="$3" + _PATH_HOSTS="${PATH_ETC}/hosts" + + echo 'Setting hostname …' + echo "${_HOSTNAME}" > "${PATH_ETC}/hostname" + hostname "${_HOSTNAME}" + + echo "Adapting ${_PATH_HOSTS} …" + if [ -z "${_FQDN}" ]; then + sed -i 's/REPLACE_WITH_FQDN/REPLACE_WITH_HOSTNAME.local REPLACE_WITH_HOSTNAME.localdomain/g' "${_PATH_HOSTS}" + else + sed -i 's/REPLACE_WITH_FQDN/'"${_FQDN}"'/g' "${_PATH_HOSTS}" + sed -i "s/#REPLACE_WITH_EXTERNAL_IP/${_EXTERNAL_IP}/g" "${_PATH_HOSTS}" + fi + sed -i 's/REPLACE_WITH_HOSTNAME/'"${_HOSTNAME}"'/g' "${_PATH_HOSTS}" +} diff --git a/bookworm/scripts/setup_server.sh b/bookworm/scripts/setup_server.sh index f77f4e4..e5ac4fa 100755 --- a/bookworm/scripts/setup_server.sh +++ b/bookworm/scripts/setup_server.sh @@ -9,6 +9,7 @@ cd $(dirname "$0") . lib/path_tmp_timestamped . lib/put_finished_marker . lib/setup_user +. lib/set_hostname_and_hosts INSTALL_TAGS='all server caddy' @@ -17,10 +18,10 @@ CADDY_PASSWORD="$1" HOSTNAME="$2" FQDN="$3" -PATH_HOSTS="${PATH_ETC}/hosts" PATH_BORG_HOME=/home/borg PATH_CADDYFILE="${PATH_ETC}/caddy/Caddyfile" PATH_CADDY_REPO='https://dl.cloudsmith.io/public/caddy/stable' +PATH_DUMP='/var/www/dump' echo -n 'Determining IP …' EXTERNAL_IP=$(hostname -I | cut -d' ' -f1) @@ -56,15 +57,7 @@ setup_user echo 'Copying over files, directories …' copy_dirtrees_of_tags ${INSTALL_TAGS} -echo 'Setting hostname …' -echo "${HOSTNAME}" > "${PATH_ETC}/hostname" -hostname "${HOSTNAME}" -echo "Adapting ${PATH_HOSTS} …" -sed -i 's/REPLACE_WITH_HOSTNAME/'"${HOSTNAME}"'/g' "${PATH_HOSTS}" -sed -i 's/REPLACE_WITH_FQDN/'"${FQDN}"'/g' "${PATH_HOSTS}" -if [ ! -z "${FQDN}" ]; then - sed -i "s/#REPLACE_WITH_EXTERNAL_IP/${EXTERNAL_IP}/g" "${PATH_HOSTS}" -fi +set_hostname_and_hosts "${HOSTNAME}" "${EXTERNAL_IP}" "${FQDN}" echo 'Syncing clock …' ntpdate-debian -s @@ -83,7 +76,7 @@ echo 'Enabling firewall …' systemctl --quiet enable --now nftables echo "Creating web-accessible directories …" -mkdir -p /var/www/dump/private /var/www/dump/public +mkdir -p "${PATH_DUMP}/private" "${PATH_DUMP}/public" echo "Adapting ${PATH_CADDYFILE} …" CADDY_PW_HASH=$(caddy hash-password --plaintext "${CADDY_PASSWORD}") diff --git a/testing/__etc/all/apt/apt.conf.d/99_minimize_dependencies b/testing/__etc/all/apt/apt.conf.d/99_minimize_dependencies deleted file mode 120000 index 4d1145f..0000000 --- a/testing/__etc/all/apt/apt.conf.d/99_minimize_dependencies +++ /dev/null @@ -1 +0,0 @@ -../../../../../bookworm/etc/all/apt/apt.conf.d/99_minimize_dependencies \ No newline at end of file diff --git a/testing/__etc/all/apt/sources.list b/testing/__etc/all/apt/sources.list deleted file mode 100644 index 9671eed..0000000 --- a/testing/__etc/all/apt/sources.list +++ /dev/null @@ -1,2 +0,0 @@ -deb http://deb.debian.org/debian testing main contrib non-free non-free-firmware -deb http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware diff --git a/testing/__etc/all/locale.conf b/testing/__etc/all/locale.conf deleted file mode 100644 index dd6eee3..0000000 --- a/testing/__etc/all/locale.conf +++ /dev/null @@ -1 +0,0 @@ -LANG="en_US.UTF-8" diff --git a/testing/__etc/all/locale.gen b/testing/__etc/all/locale.gen deleted file mode 100644 index a28cfa4..0000000 --- a/testing/__etc/all/locale.gen +++ /dev/null @@ -1,483 +0,0 @@ -# This file lists locales that you wish to have built. You can find a list -# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add -# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change -# this file, you need to rerun locale-gen. - - -# aa_DJ ISO-8859-1 -# aa_DJ.UTF-8 UTF-8 -# aa_ER UTF-8 -# aa_ER@saaho UTF-8 -# aa_ET UTF-8 -# af_ZA ISO-8859-1 -# af_ZA.UTF-8 UTF-8 -# ak_GH UTF-8 -# am_ET UTF-8 -# an_ES ISO-8859-15 -# an_ES.UTF-8 UTF-8 -# anp_IN UTF-8 -# ar_AE ISO-8859-6 -# ar_AE.UTF-8 UTF-8 -# ar_BH ISO-8859-6 -# ar_BH.UTF-8 UTF-8 -# ar_DZ ISO-8859-6 -# ar_DZ.UTF-8 UTF-8 -# ar_EG ISO-8859-6 -# ar_EG.UTF-8 UTF-8 -# ar_IN UTF-8 -# ar_IQ ISO-8859-6 -# ar_IQ.UTF-8 UTF-8 -# ar_JO ISO-8859-6 -# ar_JO.UTF-8 UTF-8 -# ar_KW ISO-8859-6 -# ar_KW.UTF-8 UTF-8 -# ar_LB ISO-8859-6 -# ar_LB.UTF-8 UTF-8 -# ar_LY ISO-8859-6 -# ar_LY.UTF-8 UTF-8 -# ar_MA ISO-8859-6 -# ar_MA.UTF-8 UTF-8 -# ar_OM ISO-8859-6 -# ar_OM.UTF-8 UTF-8 -# ar_QA ISO-8859-6 -# ar_QA.UTF-8 UTF-8 -# ar_SA ISO-8859-6 -# ar_SA.UTF-8 UTF-8 -# ar_SD ISO-8859-6 -# ar_SD.UTF-8 UTF-8 -# ar_SS UTF-8 -# ar_SY ISO-8859-6 -# ar_SY.UTF-8 UTF-8 -# ar_TN ISO-8859-6 -# ar_TN.UTF-8 UTF-8 -# ar_YE ISO-8859-6 -# ar_YE.UTF-8 UTF-8 -# as_IN UTF-8 -# ast_ES ISO-8859-15 -# ast_ES.UTF-8 UTF-8 -# ayc_PE UTF-8 -# az_AZ UTF-8 -# be_BY CP1251 -# be_BY.UTF-8 UTF-8 -# be_BY@latin UTF-8 -# bem_ZM UTF-8 -# ber_DZ UTF-8 -# ber_MA UTF-8 -# bg_BG CP1251 -# bg_BG.UTF-8 UTF-8 -# bhb_IN.UTF-8 UTF-8 -# bho_IN UTF-8 -# bn_BD UTF-8 -# bn_IN UTF-8 -# bo_CN UTF-8 -# bo_IN UTF-8 -# br_FR ISO-8859-1 -# br_FR.UTF-8 UTF-8 -# br_FR@euro ISO-8859-15 -# brx_IN UTF-8 -# bs_BA ISO-8859-2 -# bs_BA.UTF-8 UTF-8 -# byn_ER UTF-8 -# ca_AD ISO-8859-15 -# ca_AD.UTF-8 UTF-8 -# ca_ES ISO-8859-1 -# ca_ES.UTF-8 UTF-8 -# ca_ES.UTF-8@valencia UTF-8 -# ca_ES@euro ISO-8859-15 -# ca_ES@valencia ISO-8859-15 -# ca_FR ISO-8859-15 -# ca_FR.UTF-8 UTF-8 -# ca_IT ISO-8859-15 -# ca_IT.UTF-8 UTF-8 -# ce_RU UTF-8 -# chr_US UTF-8 -# cmn_TW UTF-8 -# crh_UA UTF-8 -# cs_CZ ISO-8859-2 -# cs_CZ.UTF-8 UTF-8 -# csb_PL UTF-8 -# cv_RU UTF-8 -# cy_GB ISO-8859-14 -# cy_GB.UTF-8 UTF-8 -# da_DK ISO-8859-1 -# da_DK.UTF-8 UTF-8 -# de_AT ISO-8859-1 -# de_AT.UTF-8 UTF-8 -# de_AT@euro ISO-8859-15 -# de_BE ISO-8859-1 -# de_BE.UTF-8 UTF-8 -# de_BE@euro ISO-8859-15 -# de_CH ISO-8859-1 -# de_CH.UTF-8 UTF-8 -# de_DE ISO-8859-1 -# de_DE.UTF-8 UTF-8 -# de_DE@euro ISO-8859-15 -# de_IT ISO-8859-1 -# de_IT.UTF-8 UTF-8 -# de_LI.UTF-8 UTF-8 -# de_LU ISO-8859-1 -# de_LU.UTF-8 UTF-8 -# de_LU@euro ISO-8859-15 -# doi_IN UTF-8 -# dv_MV UTF-8 -# dz_BT UTF-8 -# el_CY ISO-8859-7 -# el_CY.UTF-8 UTF-8 -# el_GR ISO-8859-7 -# el_GR.UTF-8 UTF-8 -# en_AG UTF-8 -# en_AU ISO-8859-1 -# en_AU.UTF-8 UTF-8 -# en_BW ISO-8859-1 -# en_BW.UTF-8 UTF-8 -# en_CA ISO-8859-1 -# en_CA.UTF-8 UTF-8 -# en_DK ISO-8859-1 -# en_DK.ISO-8859-15 ISO-8859-15 -# en_DK.UTF-8 UTF-8 -# en_GB ISO-8859-1 -# en_GB.ISO-8859-15 ISO-8859-15 -# en_GB.UTF-8 UTF-8 -# en_HK ISO-8859-1 -# en_HK.UTF-8 UTF-8 -# en_IE ISO-8859-1 -# en_IE.UTF-8 UTF-8 -# en_IE@euro ISO-8859-15 -# en_IL UTF-8 -# en_IN UTF-8 -# en_NG UTF-8 -# en_NZ ISO-8859-1 -# en_NZ.UTF-8 UTF-8 -# en_PH ISO-8859-1 -# en_PH.UTF-8 UTF-8 -# en_SG ISO-8859-1 -# en_SG.UTF-8 UTF-8 -# en_US ISO-8859-1 -# en_US.ISO-8859-15 ISO-8859-15 -en_US.UTF-8 UTF-8 -# en_ZA ISO-8859-1 -# en_ZA.UTF-8 UTF-8 -# en_ZM UTF-8 -# en_ZW ISO-8859-1 -# en_ZW.UTF-8 UTF-8 -# eo UTF-8 -# es_AR ISO-8859-1 -# es_AR.UTF-8 UTF-8 -# es_BO ISO-8859-1 -# es_BO.UTF-8 UTF-8 -# es_CL ISO-8859-1 -# es_CL.UTF-8 UTF-8 -# es_CO ISO-8859-1 -# es_CO.UTF-8 UTF-8 -# es_CR ISO-8859-1 -# es_CR.UTF-8 UTF-8 -# es_CU UTF-8 -# es_DO ISO-8859-1 -# es_DO.UTF-8 UTF-8 -# es_EC ISO-8859-1 -# es_EC.UTF-8 UTF-8 -# es_ES ISO-8859-1 -# es_ES.UTF-8 UTF-8 -# es_ES@euro ISO-8859-15 -# es_GT ISO-8859-1 -# es_GT.UTF-8 UTF-8 -# es_HN ISO-8859-1 -# es_HN.UTF-8 UTF-8 -# es_MX ISO-8859-1 -# es_MX.UTF-8 UTF-8 -# es_NI ISO-8859-1 -# es_NI.UTF-8 UTF-8 -# es_PA ISO-8859-1 -# es_PA.UTF-8 UTF-8 -# es_PE ISO-8859-1 -# es_PE.UTF-8 UTF-8 -# es_PR ISO-8859-1 -# es_PR.UTF-8 UTF-8 -# es_PY ISO-8859-1 -# es_PY.UTF-8 UTF-8 -# es_SV ISO-8859-1 -# es_SV.UTF-8 UTF-8 -# es_US ISO-8859-1 -# es_US.UTF-8 UTF-8 -# es_UY ISO-8859-1 -# es_UY.UTF-8 UTF-8 -# es_VE ISO-8859-1 -# es_VE.UTF-8 UTF-8 -# et_EE ISO-8859-1 -# et_EE.ISO-8859-15 ISO-8859-15 -# et_EE.UTF-8 UTF-8 -# eu_ES ISO-8859-1 -# eu_ES.UTF-8 UTF-8 -# eu_ES@euro ISO-8859-15 -# eu_FR ISO-8859-1 -# eu_FR.UTF-8 UTF-8 -# eu_FR@euro ISO-8859-15 -# fa_IR UTF-8 -# ff_SN UTF-8 -# fi_FI ISO-8859-1 -# fi_FI.UTF-8 UTF-8 -# fi_FI@euro ISO-8859-15 -# fil_PH UTF-8 -# fo_FO ISO-8859-1 -# fo_FO.UTF-8 UTF-8 -# fr_BE ISO-8859-1 -# fr_BE.UTF-8 UTF-8 -# fr_BE@euro ISO-8859-15 -# fr_CA ISO-8859-1 -# fr_CA.UTF-8 UTF-8 -# fr_CH ISO-8859-1 -# fr_CH.UTF-8 UTF-8 -# fr_FR ISO-8859-1 -# fr_FR.UTF-8 UTF-8 -# fr_FR@euro ISO-8859-15 -# fr_LU ISO-8859-1 -# fr_LU.UTF-8 UTF-8 -# fr_LU@euro ISO-8859-15 -# fur_IT UTF-8 -# fy_DE UTF-8 -# fy_NL UTF-8 -# ga_IE ISO-8859-1 -# ga_IE.UTF-8 UTF-8 -# ga_IE@euro ISO-8859-15 -# gd_GB ISO-8859-15 -# gd_GB.UTF-8 UTF-8 -# gez_ER UTF-8 -# gez_ER@abegede UTF-8 -# gez_ET UTF-8 -# gez_ET@abegede UTF-8 -# gl_ES ISO-8859-1 -# gl_ES.UTF-8 UTF-8 -# gl_ES@euro ISO-8859-15 -# gu_IN UTF-8 -# gv_GB ISO-8859-1 -# gv_GB.UTF-8 UTF-8 -# ha_NG UTF-8 -# hak_TW UTF-8 -# he_IL ISO-8859-8 -# he_IL.UTF-8 UTF-8 -# hi_IN UTF-8 -# hne_IN UTF-8 -# hr_HR ISO-8859-2 -# hr_HR.UTF-8 UTF-8 -# hsb_DE ISO-8859-2 -# hsb_DE.UTF-8 UTF-8 -# ht_HT UTF-8 -# hu_HU ISO-8859-2 -# hu_HU.UTF-8 UTF-8 -# hy_AM UTF-8 -# hy_AM.ARMSCII-8 ARMSCII-8 -# ia_FR UTF-8 -# id_ID ISO-8859-1 -# id_ID.UTF-8 UTF-8 -# ig_NG UTF-8 -# ik_CA UTF-8 -# is_IS ISO-8859-1 -# is_IS.UTF-8 UTF-8 -# it_CH ISO-8859-1 -# it_CH.UTF-8 UTF-8 -# it_IT ISO-8859-1 -# it_IT.UTF-8 UTF-8 -# it_IT@euro ISO-8859-15 -# iu_CA UTF-8 -# ja_JP.EUC-JP EUC-JP -# ja_JP.UTF-8 UTF-8 -# ka_GE GEORGIAN-PS -# ka_GE.UTF-8 UTF-8 -# kk_KZ PT154 -# kk_KZ.RK1048 RK1048 -# kk_KZ.UTF-8 UTF-8 -# kl_GL ISO-8859-1 -# kl_GL.UTF-8 UTF-8 -# km_KH UTF-8 -# kn_IN UTF-8 -# ko_KR.EUC-KR EUC-KR -# ko_KR.UTF-8 UTF-8 -# kok_IN UTF-8 -# ks_IN UTF-8 -# ks_IN@devanagari UTF-8 -# ku_TR ISO-8859-9 -# ku_TR.UTF-8 UTF-8 -# kw_GB ISO-8859-1 -# kw_GB.UTF-8 UTF-8 -# ky_KG UTF-8 -# lb_LU UTF-8 -# lg_UG ISO-8859-10 -# lg_UG.UTF-8 UTF-8 -# li_BE UTF-8 -# li_NL UTF-8 -# lij_IT UTF-8 -# ln_CD UTF-8 -# lo_LA UTF-8 -# lt_LT ISO-8859-13 -# lt_LT.UTF-8 UTF-8 -# lv_LV ISO-8859-13 -# lv_LV.UTF-8 UTF-8 -# lzh_TW UTF-8 -# mag_IN UTF-8 -# mai_IN UTF-8 -# mg_MG ISO-8859-15 -# mg_MG.UTF-8 UTF-8 -# mhr_RU UTF-8 -# mi_NZ ISO-8859-13 -# mi_NZ.UTF-8 UTF-8 -# mk_MK ISO-8859-5 -# mk_MK.UTF-8 UTF-8 -# ml_IN UTF-8 -# mn_MN UTF-8 -# mni_IN UTF-8 -# mr_IN UTF-8 -# ms_MY ISO-8859-1 -# ms_MY.UTF-8 UTF-8 -# mt_MT ISO-8859-3 -# mt_MT.UTF-8 UTF-8 -# my_MM UTF-8 -# nan_TW UTF-8 -# nan_TW@latin UTF-8 -# nb_NO ISO-8859-1 -# nb_NO.UTF-8 UTF-8 -# nds_DE UTF-8 -# nds_NL UTF-8 -# ne_NP UTF-8 -# nhn_MX UTF-8 -# niu_NU UTF-8 -# niu_NZ UTF-8 -# nl_AW UTF-8 -# nl_BE ISO-8859-1 -# nl_BE.UTF-8 UTF-8 -# nl_BE@euro ISO-8859-15 -# nl_NL ISO-8859-1 -# nl_NL.UTF-8 UTF-8 -# nl_NL@euro ISO-8859-15 -# nn_NO ISO-8859-1 -# nn_NO.UTF-8 UTF-8 -# nr_ZA UTF-8 -# nso_ZA UTF-8 -# oc_FR ISO-8859-1 -# oc_FR.UTF-8 UTF-8 -# om_ET UTF-8 -# om_KE ISO-8859-1 -# om_KE.UTF-8 UTF-8 -# or_IN UTF-8 -# os_RU UTF-8 -# pa_IN UTF-8 -# pa_PK UTF-8 -# pap_AW UTF-8 -# pap_CW UTF-8 -# pl_PL ISO-8859-2 -# pl_PL.UTF-8 UTF-8 -# ps_AF UTF-8 -# pt_BR ISO-8859-1 -# pt_BR.UTF-8 UTF-8 -# pt_PT ISO-8859-1 -# pt_PT.UTF-8 UTF-8 -# pt_PT@euro ISO-8859-15 -# quz_PE UTF-8 -# raj_IN UTF-8 -# ro_RO ISO-8859-2 -# ro_RO.UTF-8 UTF-8 -# ru_RU ISO-8859-5 -# ru_RU.CP1251 CP1251 -# ru_RU.KOI8-R KOI8-R -# ru_RU.UTF-8 UTF-8 -# ru_UA KOI8-U -# ru_UA.UTF-8 UTF-8 -# rw_RW UTF-8 -# sa_IN UTF-8 -# sat_IN UTF-8 -# sc_IT UTF-8 -# sd_IN UTF-8 -# sd_IN@devanagari UTF-8 -# se_NO UTF-8 -# sgs_LT UTF-8 -# shs_CA UTF-8 -# si_LK UTF-8 -# sid_ET UTF-8 -# sk_SK ISO-8859-2 -# sk_SK.UTF-8 UTF-8 -# sl_SI ISO-8859-2 -# sl_SI.UTF-8 UTF-8 -# so_DJ ISO-8859-1 -# so_DJ.UTF-8 UTF-8 -# so_ET UTF-8 -# so_KE ISO-8859-1 -# so_KE.UTF-8 UTF-8 -# so_SO ISO-8859-1 -# so_SO.UTF-8 UTF-8 -# sq_AL ISO-8859-1 -# sq_AL.UTF-8 UTF-8 -# sq_MK UTF-8 -# sr_ME UTF-8 -# sr_RS UTF-8 -# sr_RS@latin UTF-8 -# ss_ZA UTF-8 -# st_ZA ISO-8859-1 -# st_ZA.UTF-8 UTF-8 -# sv_FI ISO-8859-1 -# sv_FI.UTF-8 UTF-8 -# sv_FI@euro ISO-8859-15 -# sv_SE ISO-8859-1 -# sv_SE.ISO-8859-15 ISO-8859-15 -# sv_SE.UTF-8 UTF-8 -# sw_KE UTF-8 -# sw_TZ UTF-8 -# szl_PL UTF-8 -# ta_IN UTF-8 -# ta_LK UTF-8 -# tcy_IN.UTF-8 UTF-8 -# te_IN UTF-8 -# tg_TJ KOI8-T -# tg_TJ.UTF-8 UTF-8 -# th_TH TIS-620 -# th_TH.UTF-8 UTF-8 -# the_NP UTF-8 -# ti_ER UTF-8 -# ti_ET UTF-8 -# tig_ER UTF-8 -# tk_TM UTF-8 -# tl_PH ISO-8859-1 -# tl_PH.UTF-8 UTF-8 -# tn_ZA UTF-8 -# tr_CY ISO-8859-9 -# tr_CY.UTF-8 UTF-8 -# tr_TR ISO-8859-9 -# tr_TR.UTF-8 UTF-8 -# ts_ZA UTF-8 -# tt_RU UTF-8 -# tt_RU@iqtelif UTF-8 -# ug_CN UTF-8 -# uk_UA KOI8-U -# uk_UA.UTF-8 UTF-8 -# unm_US UTF-8 -# ur_IN UTF-8 -# ur_PK UTF-8 -# uz_UZ ISO-8859-1 -# uz_UZ.UTF-8 UTF-8 -# uz_UZ@cyrillic UTF-8 -# ve_ZA UTF-8 -# vi_VN UTF-8 -# wa_BE ISO-8859-1 -# wa_BE.UTF-8 UTF-8 -# wa_BE@euro ISO-8859-15 -# wae_CH UTF-8 -# wal_ET UTF-8 -# wo_SN UTF-8 -# xh_ZA ISO-8859-1 -# xh_ZA.UTF-8 UTF-8 -# yi_US CP1255 -# yi_US.UTF-8 UTF-8 -# yo_NG UTF-8 -# yue_HK UTF-8 -# zh_CN GB2312 -# zh_CN.GB18030 GB18030 -# zh_CN.GBK GBK -# zh_CN.UTF-8 UTF-8 -# zh_HK BIG5-HKSCS -# zh_HK.UTF-8 UTF-8 -# zh_SG GB2312 -# zh_SG.GBK GBK -# zh_SG.UTF-8 UTF-8 -# zh_TW BIG5 -# zh_TW.EUC-TW EUC-TW -# zh_TW.UTF-8 UTF-8 -# zu_ZA ISO-8859-1 -# zu_ZA.UTF-8 UTF-8 diff --git a/testing/__etc/all/timezone b/testing/__etc/all/timezone deleted file mode 100644 index 94d5acc..0000000 --- a/testing/__etc/all/timezone +++ /dev/null @@ -1 +0,0 @@ -Europe/Berlin diff --git a/testing/__etc/desktop/network/interfaces b/testing/__etc/desktop/network/interfaces deleted file mode 100644 index 303ee92..0000000 --- a/testing/__etc/desktop/network/interfaces +++ /dev/null @@ -1,10 +0,0 @@ -# This file describes the network interfaces available on your system -# and how to activate them. For more information, see interfaces(5). - -source /etc/network/interfaces.d/* - -# The loopback network interface -auto lo -iface lo inet loopback - -# anything more would only confuse NetworkManager diff --git a/testing/__home/all/.bash_profile b/testing/__home/all/.bash_profile deleted file mode 120000 index 6c35564..0000000 --- a/testing/__home/all/.bash_profile +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/home/all/.bash_profile \ No newline at end of file diff --git a/testing/__home/all/.bashrc b/testing/__home/all/.bashrc deleted file mode 120000 index 8f7b90b..0000000 --- a/testing/__home/all/.bashrc +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/home/all/.bashrc \ No newline at end of file diff --git a/testing/__home/all/.plomlib/file_dot_variants b/testing/__home/all/.plomlib/file_dot_variants deleted file mode 120000 index 349810a..0000000 --- a/testing/__home/all/.plomlib/file_dot_variants +++ /dev/null @@ -1 +0,0 @@ -../../../../bookworm/home/all/.plomlib/file_dot_variants \ No newline at end of file diff --git a/testing/__home/all/.profile b/testing/__home/all/.profile deleted file mode 120000 index b4338c4..0000000 --- a/testing/__home/all/.profile +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/home/all/.profile \ No newline at end of file diff --git a/testing/__home/desktop/.bashrc.desktop b/testing/__home/desktop/.bashrc.desktop deleted file mode 100644 index baa8d8b..0000000 --- a/testing/__home/desktop/.bashrc.desktop +++ /dev/null @@ -1,4 +0,0 @@ -# mere "kb" might be more flexible, but this way I won't accidentally try for -# a non-existing "en" layout -alias kb_de="swaymsg 'input * xkb_layout de'" -alias kb_us="swaymsg 'input * xkb_layout us'" diff --git a/testing/__home/desktop/.config/sway/config b/testing/__home/desktop/.config/sway/config deleted file mode 100644 index f8c16e2..0000000 --- a/testing/__home/desktop/.config/sway/config +++ /dev/null @@ -1,91 +0,0 @@ -# because these are included by /etc/sway/config for probably good reason … -include /etc/sway/config-vars.d/* -include /etc/sway/config.d/* - -# font for wm text -font pango:Terminus 16px - -# force "tabbed" as default layout for new windows -workspace_layout tabbed - -# simple green background -output * background #559911 solid_color - -# keyboard layout -input * xkb_layout "us" - -# waybar -bar { - position top - status_command ~/.nonpath_bins/status.sh -} - -# make Windows key modifier key for all wm actions -set $mod Mod4 -floating_modifier $mod - -# program launcher -bindsym $mod+d exec wmenu-run -bindsym $mod+x exec wmenu-run - -# launch terminal emulator -bindsym $mod+Return exec foot --font=monospace:size=12 - -# kill window -bindsym $mod+Shift+q kill - -# move focus between windows, but not by mouse -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right -focus_follows_mouse no - -# move windows -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# resize windows -bindsym $mod+h resize shrink width 1 px or 1 ppt -bindsym $mod+l resize grow width 1 px or 1 ppt -bindsym $mod+j resize shrink height -bindsym $mod+k resize grow height - -# toggle fullscreen for focused window -bindsym $mod+f fullscreen - -# toggle floating of window, focus on floating or tabbed windows. -bindsym $mod+Shift+space floating toggle -bindsym $mod+space focus mode_toggle - -# reload config file -bindsym $mod+Shift+c reload - -# stop wm -bindsym $mod+Shift+p exit - -# switch workspaces -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 - -# move window to workspace -bindsym $mod+Shift+1 move workspace 1 -bindsym $mod+Shift+2 move workspace 2 -bindsym $mod+Shift+3 move workspace 3 -bindsym $mod+Shift+4 move workspace 4 -bindsym $mod+Shift+5 move workspace 5 -bindsym $mod+Shift+6 move workspace 6 -bindsym $mod+Shift+7 move workspace 7 -bindsym $mod+Shift+8 move workspace 8 -bindsym $mod+Shift+9 move workspace 9 -bindsym $mod+Shift+0 move workspace 10 diff --git a/testing/__home/desktop/.local/bin/borgplom b/testing/__home/desktop/.local/bin/borgplom deleted file mode 100755 index e3db0cca..0000000 --- a/testing/__home/desktop/.local/bin/borgplom +++ /dev/null @@ -1,221 +0,0 @@ -#!/bin/sh -set -e -cd $(dirname "$0") -. lib/abort -. lib/constants_borg # PATH_BORG_CONF -. lib/expect_n_args -. lib/get_passphrase -. lib/path_tmp_timestamped -. lib/print_usage -. lib/retry_until -cd - > /dev/null - -USAGE_DESCRIPTION='Wrapper around certain borgbackup usages.\n\nAvailable commands:' -USAGE_LINES='COMMAND [ARGUMENT]...' - -PATH_BORG_CONF_SECURITY="${PATH_BORG_CONF}/security" -PATH_BORG_CONF_KEYS="${PATH_BORG_CONF}/keys" -location_from_servername() { printf 'ssh://borg@%s/./borgrepo' "$1"; } -servername_from_location() { echo "$1" | cut -d'/' -f3 | cut -d'@' -f2; } -path_repo_location() { printf '%s' "${PATH_BORG_CONF_SECURITY}/${1}/location"; } - -# exits -export BORG_EXIT_CODES=modern -error_exit() { abort "Aborting due to $1"; } -error_exit_with_usage() { error_exit "${1}\n\n$(print_usage)"; } -exit_ok() { echo "$@"; exit 0; } - -# commands -USAGE_INDICES='backup_keys claim help info init keys orgpull orgpush' - -_run_borg_with_passphrase() { - _FIRST_RUN=1 - _ON_LOOP_START=' - if [ -z "${BORG_PASSPHRASE}" ]; then - printf "Passphrase:" - export BORG_PASSPHRASE="$(get_passphrase)" - echo "" - fi - ' - _TO_TEST='borg '"$@" - _ON_FAIL='echo "unexpected borg error, code ${_RESULT}."' - _ON_LOOP_END='export BORG_PASSPHRASE=' - retry_until 52 "${_ON_LOOP_START}" "${_TO_TEST}" "${_ON_FAIL}" "${_ON_LOOP_END}" -} - -_id_from_file() { head -1 "$1" | cut -d' ' -f2; } - -USAGE_ARGS_backup_keys='PATH' -USAGE_DESC_backup_keys="copy known keys to PATH/, with their repos' server names as filenames" -CMDFNC_backup_keys() { - expect_n_args 1 1 "${USAGE_ARGS_backup_keys}" $@ - _PATH_TARGET_DIR=$(realpath "$1") - if [ -e "${_PATH_TARGET_DIR}" ] && [ ! -d "${_PATH_TARGET_DIR}" ]; then - error_exit "non-directory at ${_PATH_TARGET_DIR}" - fi - mkdir -p "${_PATH_TARGET_DIR}" - cd "${PATH_BORG_CONF_KEYS}" - ls -1 | while read _FILENAME; do - _KEY_ID=$(_id_from_file "${_FILENAME}") - _PATH_LOC="$(path_repo_location ${_KEY_ID})" - if [ ! -f "${_PATH_LOC}" ]; then - echo "Ignoring ${_FILENAME} due to lack of matching location file." - continue - fi - _NAME_SERVER=$(servername_from_location "$(cat ${_PATH_LOC})") - _PATH_TARGET="${_PATH_TARGET_DIR}/${_NAME_SERVER}" - echo "Copying ${_FILENAME} to ${_PATH_TARGET} …" - cp "${_FILENAME}" "${_PATH_TARGET}" - done - cd - > /dev/null -} - -USAGE_ARGS_claim='PATH' -USAGE_DESC_claim="register file of PATH as key to repo at \"$(location_from_servername SERVER_NAME)\", with SERVER_NAME the filename portion of PATH" -CMDFNC_claim() { - expect_n_args 1 1 "${USAGE_ARGS_claim}" $@ - _PATH_SOURCE="$1" - _ensure_no_overwrite_at() { - if [ -f "$1" ]; then - error_exit "refusing to overwrite pre-existing file at $1" - fi - } - - _FILENAME=$(basename ${_PATH_SOURCE}) - _PATH_TARGET_KEY="${PATH_BORG_CONF_KEYS}/${_FILENAME}" - if [ ! -f "${_PATH_SOURCE}" ]; then - error_exit "no file at ${_PATH_SOURCE}" - fi - _ensure_no_overwrite_at "${_PATH_TARGET_KEY}" - _REPO_ID="$(_id_from_file ${_PATH_SOURCE})" - if [ ! -z "$(echo ${_REPO_ID} | sed 's/[a-f0-9]//g')" ]; then - error_exit "inability to parse valid repo ID from alleged key file at $1" - fi - _PATH_TARGET_LOCATION="$(path_repo_location ${_REPO_ID})" - _ensure_no_overwrite_at "${_PATH_TARGET_LOCATION}" - mkdir -p "${PATH_BORG_CONF_KEYS}" "$(dirname ${_PATH_TARGET_LOCATION})" - echo "Copying ${_PATH_SOURCE} to ${_PATH_TARGET_KEY} …" - cp "${_PATH_SOURCE}" "${_PATH_TARGET_KEY}" - echo "Writing ${_PATH_TARGET_LOCATION} …" - printf '%s' "$(location_from_servername ${_FILENAME})" > "${_PATH_TARGET_LOCATION}" - chmod a-rwx,u+rw "${_PATH_TARGET_KEY}" "${_PATH_TARGET_LOCATION}" -} - -USAGE_DESC_help='print this help and exit' -CMDFNC_help() { - expect_n_args 0 0 '' $@ - print_usage -} - -USAGE_ARGS_info='SERVER_NAME [ARCHIVE]' -USAGE_DESC_info="run 'borg info' against repo at \"$(location_from_servername SERVER_NAME)\", optionally only against ARCHIVE; if latter not provided, list most recent archives of repo" -CMDFNC_info() { - expect_n_args 1 2 "${USAGE_ARGS_info}" $@ - _TARGET_REPO="$(location_from_servername ${1})" - if [ ! -z "$2" ]; then - exit_ok $(borg info "${_TARGET_REPO}::$2") - fi - _run_borg_with_passphrase info "${_TARGET_REPO}" - echo "${_OUTPUT}\n\nMost recent archives:" - borg list "${_TARGET_REPO}" | tail -5 -} - -USAGE_ARGS_init='SERVER_NAME' -USAGE_DESC_init="create repo at \"$(location_from_servername SERVER_NAME)\"" -CMDFNC_init() { - expect_n_args 1 1 "${USAGE_ARGS_init}" $@ - _STASHED_BORG_PASSPHRASE="$(env | grep -E '^BORG_PASSPHRASE=' | cut -d'=' -f2-)" - unset BORG_PASSPHRASE - borg init --encryption=keyfile "$(location_from_servername $1)" - if [ ! -z "${_STASHED_BORG_PASSPHRASE}" ]; then - export BORG_PASSPHRASE="${_STASHED_BORG_PASSPHRASE}" - _STASHED_BORG_PASSPHRASE= - fi -} - -USAGE_DESC_keys='list known repos in ID, key filename, and alleged location' -CMDFNC_keys() { - expect_n_args 0 0 '' $@ - echo "Known keys, as per ${PATH_BORG_CONF_KEYS}:" - _EXIT_OK_PREFIX='(none, since directory' - if [ ! -d "${PATH_BORG_CONF_KEYS}" ]; then - exit_ok "${_EXIT_OK_PREFIX} non-existant)" - fi - _KEYFILES="$(ls -1 ${PATH_BORG_CONF_KEYS})" - if [ -z "${_KEYFILES}" ]; then - exit_ok "${_EXIT_OK_PREFIX} empty)" - fi - echo "${_KEYFILES}" | while read _FILENAME; do - _KEY_ID=$(_id_from_file "${PATH_BORG_CONF_KEYS}/${_FILENAME}") - _PATH_LOC="$(path_repo_location ${_KEY_ID})" - printf "${_KEY_ID} ${_FILENAME} " - if [ -f "${_PATH_LOC}" ]; then - printf '%s\n' "$(cat ${_PATH_LOC})" - else - printf '?\n' - fi - done -} - -USAGE_DESC_orgpull='pull most recent org directory available in repos' -CMDFNC_orgpull() { - expect_n_args 0 0 '' $@ - _NAME_ARCHIVE=orgdir - - # determine server and repo - _PATH_PIPE="$(path_tmp_timestamped 'pipe')" - mkfifo "${_PATH_PIPE}" - ls -1 "${PATH_BORG_CONF_SECURITY}/" > "${_PATH_PIPE}" & - while read _FILENAME; do - _LOCATION="$(cat $(path_repo_location ${_FILENAME}))" - _NAME_SERVER=$(servername_from_location "${_LOCATION}") - if ping -c1 -W2 "${_NAME_SERVER}" > /dev/null 2>&1; then - _REPO="${_LOCATION}" - break - else - echo "Cannot reach ${_NAME_SERVER}, skipping." - fi - done < "${_PATH_PIPE}" - rm "${_PATH_PIPE}" - if [ -z "${_REPO}" ]; then - error_exit 'no repo being available.' - fi - - # determine passphrase and archive - echo "Checking out ${_REPO} …" - _run_borg_with_passphrase list "${_REPO}" - _ARCHIVE=$(echo "${_OUTPUT}" | grep "${_NAME_ARCHIVE}" | tail -1 | cut -f1 -d' ') - - # pull archive - echo "Pulling archive: ${_ARCHIVE}" - cd / - borg extract --verbose "${_REPO}::${_ARCHIVE}" -} - -USAGE_DESC_orgpush='push org directory to repos' -CMDFNC_orgpush() { - expect_n_args 0 0 '' $@ - _NAME_ARCHIVE=orgdir - - for _FILENAME in $(ls "${PATH_BORG_CONF_SECURITY}/"); do - _REPO="$(cat $(path_repo_location ${_FILENAME}))" - _ARCHIVE="${_REPO}::${_NAME_ARCHIVE}-{utcnow:%Y-%m-%dT%H:%M}" - _run_borg_with_passphrase create --verbose "${_ARCHIVE}" "${HOME}/org" - done -} - -# parse args to execution -if [ "$#" -lt 1 ]; then - error_exit_with_usage 'missing command.' -fi -for CMD in ${USAGE_INDICES}; do - if [ "$1" = "${CMD}" ]; then - break - fi - CMD= -done -if [ -z "${CMD}" ]; then - error_exit_with_usage "unknown command: ${1}" -fi -shift 1 -"CMDFNC_${CMD}" $@ diff --git a/testing/__home/desktop/.local/bin/make_secrets b/testing/__home/desktop/.local/bin/make_secrets deleted file mode 100755 index 344214e..0000000 --- a/testing/__home/desktop/.local/bin/make_secrets +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -set -e - -cd $(dirname "$0") -. lib/abort_if_exists -. lib/constants_borg # NAME_BORGAPP, PATH_BORG_CONF -. lib/constants_secrets # PATH_REL_SECRETS, PATH_SECRETS, PATH_SECRETS_BORGKEYS -. lib/constants_ssh # PATH_USER_SSH -. lib/constants_user # USERNAME -. lib/mount_secrets # mount_secrets, copy_and_unmount_secrets - -abort_if_exists "${PATH_SECRETS}" -echo "Collecting new ${PATH_REL_SECRETS}." -mkdir "${PATH_SECRETS}" -"${NAME_BORGAPP}" backup_keys "${PATH_SECRETS_BORGKEYS}" -cp -a "${PATH_USER_SSH}" "${PATH_SECRETS_SSH}" -echo "secrets file, last update: $(whoami)/$(hostname) at $(date)" > "${PATH_SECRETS}/info" - -mount_secrets "$1" # sets PATH_MOUNTED_SECRETS -SUFFIX_OLD=.old -PATH_REL_SECRETS_OLD="${PATH_REL_SECRETS}${SUFFIX_OLD}" -PATH_MOUNTED_SECRETS_OLD="${PATH_MOUNTED_SECRETS}${SUFFIX_OLD}" -if [ -d "${PATH_MOUNTED_SECRETS}" ]; then - echo "Drive already has ${PATH_REL_SECRETS}, moving to ${PATH_REL_SECRETS_OLD}." - rm -rf "${PATH_MOUNTED_SECRETS_OLD}" - mv "${PATH_MOUNTED_SECRETS}" "${PATH_MOUNTED_SECRETS_OLD}" -fi -copy_and_unmount_secrets 'out' diff --git a/testing/__home/desktop/.local/bin/vol b/testing/__home/desktop/.local/bin/vol deleted file mode 100755 index e77a243..0000000 --- a/testing/__home/desktop/.local/bin/vol +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -set -e -cd $(dirname "$0") -. lib/abort -. lib/audio_dev_is_mute -. lib/print_usage - -MAX_LOUDNESS=150 - -FLAG_HELP_SHORT='-h' -FLAG_HELP_LONG='--help' - -USAGE_DESCRIPTION='Set audio volume, or (if called without any arguments) toggle audio device muteness.\n\nAvailable arguments:' -USAGE_LINES='[COMMAND]\nLOUDNESS' -USAGE_INDICES='LOUDNESS _help' -USAGE_DESC_LOUDNESS='audio volume to set (as percentage, must be integer)' -USAGE_DESC__help='display this help and exit' -USAGE_NAME__help="${FLAG_HELP_SHORT}, ${FLAG_HELP_LONG}" - -error_exit() { abort "Aborting due to $1\n\n$(print_usage)"; } - -toggle_mute() { - if audio_dev_is_mute; then - MUTE_BOOL=0 - MUTE_WORD=off - else - MUTE_BOOL=1 - MUTE_WORD=on - fi - pacmd set-sink-mute 0 "${MUTE_BOOL}" - echo "Toggled audio device muteness ${MUTE_WORD}." -} - -set_vol_percentage() { - AT_FULL=65536 - pacmd set-sink-volume 0 $(calc "($1 * ${AT_FULL} // 100)") - echo -n "Audio volume set to ${1}%." - audio_dev_is_mute && echo -n " (But audio device is muted.)" - echo -} - -N_MAX_ARGS=1 -if [ "$#" -gt "${N_MAX_ARGS}" ]; then - error_exit "number of arguments greater ${N_MAX_ARGS}." -elif [ -z "$1" ]; then - toggle_mute -elif [ -z "$(echo -n $1 | sed 's/[0-9]*//g')" ]; then - if [ "$1" -gt "${MAX_LOUDNESS}" ]; then - error_exit "demand for unreasonably high loudness: $1." - fi - set_vol_percentage "$1" -elif [ "$1" = "$FLAG_HELP_SHORT" ] || [ "$1" = "$FLAG_HELP_LONG" ]; then - print_usage -else - error_exit "unrecognized argument: $1" -fi diff --git a/testing/__home/desktop/.plomlib/abort b/testing/__home/desktop/.plomlib/abort deleted file mode 120000 index 3afad55..0000000 --- a/testing/__home/desktop/.plomlib/abort +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/abort \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/abort_if_exists b/testing/__home/desktop/.plomlib/abort_if_exists deleted file mode 120000 index 8ea409a..0000000 --- a/testing/__home/desktop/.plomlib/abort_if_exists +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/abort_if_exists \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/audio_dev_is_mute b/testing/__home/desktop/.plomlib/audio_dev_is_mute deleted file mode 100644 index e28da40..0000000 --- a/testing/__home/desktop/.plomlib/audio_dev_is_mute +++ /dev/null @@ -1,3 +0,0 @@ -audio_dev_is_mute() { - [ "$(pactl get-sink-mute 0)" = "Mute: yes" ] -} diff --git a/testing/__home/desktop/.plomlib/constants_borg b/testing/__home/desktop/.plomlib/constants_borg deleted file mode 120000 index 1cc05f7..0000000 --- a/testing/__home/desktop/.plomlib/constants_borg +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/constants_borg \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/constants_secrets b/testing/__home/desktop/.plomlib/constants_secrets deleted file mode 120000 index 85c9977..0000000 --- a/testing/__home/desktop/.plomlib/constants_secrets +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/constants_secrets \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/constants_ssh b/testing/__home/desktop/.plomlib/constants_ssh deleted file mode 120000 index 7b0ccb4..0000000 --- a/testing/__home/desktop/.plomlib/constants_ssh +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/constants_ssh \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/constants_user b/testing/__home/desktop/.plomlib/constants_user deleted file mode 120000 index 79ec36f..0000000 --- a/testing/__home/desktop/.plomlib/constants_user +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/constants_user \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/expect_min_n_args b/testing/__home/desktop/.plomlib/expect_min_n_args deleted file mode 120000 index 2966623..0000000 --- a/testing/__home/desktop/.plomlib/expect_min_n_args +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/expect_min_n_args \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/expect_n_args b/testing/__home/desktop/.plomlib/expect_n_args deleted file mode 120000 index a0925a1..0000000 --- a/testing/__home/desktop/.plomlib/expect_n_args +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/expect_n_args \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/get_passphrase b/testing/__home/desktop/.plomlib/get_passphrase deleted file mode 120000 index 3d542b5..0000000 --- a/testing/__home/desktop/.plomlib/get_passphrase +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/get_passphrase \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/mount_secrets b/testing/__home/desktop/.plomlib/mount_secrets deleted file mode 120000 index 86f3878..0000000 --- a/testing/__home/desktop/.plomlib/mount_secrets +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/mount_secrets \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/path_tmp_timestamped b/testing/__home/desktop/.plomlib/path_tmp_timestamped deleted file mode 120000 index 0752df5..0000000 --- a/testing/__home/desktop/.plomlib/path_tmp_timestamped +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/path_tmp_timestamped \ No newline at end of file diff --git a/testing/__home/desktop/.plomlib/print_usage b/testing/__home/desktop/.plomlib/print_usage deleted file mode 100644 index b1d6204..0000000 --- a/testing/__home/desktop/.plomlib/print_usage +++ /dev/null @@ -1,37 +0,0 @@ -print_usage() { - echo 'Usage:' - echo "${USAGE_LINES}" | while read _LINE; do - echo " $(basename $0) ${_LINE}" - done - echo "\n${USAGE_DESCRIPTION}\n" - _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; } - _build_index() { - _ARGS="$(_var_of 'USAGE_ARGS_' ${_IDX})" - if [ ! -z "${_ARGS}" ]; then - _ARGS=" ${_ARGS}" - fi - _NAME="${_IDX}" - _ALT_NAME="$(_var_of 'USAGE_NAME_' ${_IDX})" - if [ ! -z "${_ALT_NAME}" ]; then - _NAME="${_ALT_NAME}" - fi - _KEY=" ${_NAME}${_ARGS}" - _LEN_KEY=$(echo -n "${_KEY}" | wc -c) - } - _MAX_LEN_KEY=0 - for _IDX in ${USAGE_INDICES}; do - _build_index - if [ "${_LEN_KEY}" -gt "${_MAX_LEN_KEY}" ]; then - _MAX_LEN_KEY="${_LEN_KEY}" - fi - done - for _IDX in ${USAGE_INDICES}; do - _build_index - printf '%s' "${_KEY}" - _LEN_GAP=$(calc "${_MAX_LEN_KEY} - ${_LEN_KEY} + 4") - for _ in $(seq 1 ${_LEN_GAP}); do - printf ' ' - done - printf '%s\n' "$(_var_of 'USAGE_DESC_' ${_IDX})" - done -} diff --git a/testing/__home/desktop/.plomlib/retry_until b/testing/__home/desktop/.plomlib/retry_until deleted file mode 120000 index 2c75318..0000000 --- a/testing/__home/desktop/.plomlib/retry_until +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/retry_until \ No newline at end of file diff --git a/testing/__home/desktop/.profile.desktop b/testing/__home/desktop/.profile.desktop deleted file mode 100644 index 57a42bd..0000000 --- a/testing/__home/desktop/.profile.desktop +++ /dev/null @@ -1,6 +0,0 @@ -# so we don't have to enter our SSH key password all the time -eval $(ssh-agent) && ssh-add - -# zero audio volume (rather than "just" mute) -vol 0 - diff --git a/testing/__home/desktop/.tridactylrc b/testing/__home/desktop/.tridactylrc deleted file mode 100644 index d13f9fb..0000000 --- a/testing/__home/desktop/.tridactylrc +++ /dev/null @@ -1,17 +0,0 @@ -bind j scrollline 3 -bind k scrollline -3 -set hintuppercase false -set hintchars 123456qwertasdfgyxcvb - -set searchengine duckduckgo -set searchurls.wiktionary https://en.wiktionary.org/w/index.php?search= -set searchurls.dictcc https://www.dict.cc/?s= - -autocmd DocStart www.reddit.com urlmodify -t www.reddit old.reddit - -set theme dark -guiset gui none -guiset tabs always -guiset hoverlink left - -escapehatch diff --git a/testing/__home/root/.shell_prompt_color b/testing/__home/root/.shell_prompt_color deleted file mode 120000 index c863eca..0000000 --- a/testing/__home/root/.shell_prompt_color +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/home/root/.shell_prompt_color \ No newline at end of file diff --git a/testing/__home/t490s/.nonpath_bins/status.sh b/testing/__home/t490s/.nonpath_bins/status.sh deleted file mode 100755 index 2de1358..0000000 --- a/testing/__home/t490s/.nonpath_bins/status.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/sh -# see sway-bar(5) and swaybar-protocol(7) -set -e - -. "${HOME}/.plomlib/audio_dev_is_mute" - -SYSCLASS_DIR=/sys/class - -COL_WHITE=dddddd -COL_RED=dd0000 -COL_YELLOW=dddd00 -COL_GREEN=00dd00 -COL_GREY=aaaaaa - -print_bar_block() { - printf '{"full_text": "%s", ' "$1" - COLOR="${COL_GREY}" - if [ ! -z "$2" ]; then - COLOR="$2" - fi - printf '"color": "%s", ' "${COLOR}" - if [ "$3" = "0" ]; then - printf '"separator": false,\n' - printf '"separator_block_width": 0,' - fi - printf '"markup": "pango",\n' - printf '},\n' -} - -print_calc() { - printf "%d" $(calc "$1") -} - -color_at() { - IDX=0 - while true; do - IDX=$(print_calc "${IDX} + 1") - STEP=$(echo "$2" | cut -d'_' -f${IDX}) - if [ -z "${STEP}" ]; then - break - fi - LIMIT=$(echo "${STEP}" | cut -d':' -f1) - COLOR=$(echo "${STEP}" | cut -d':' -f2) - if [ "${LIMIT}" -ge "${1}" ]; then - printf "${COLOR}" - break - fi - done -} - -print_clipboard() { - print_selection() { - print_bar_block "$1 [" "${COL_WHITE}" 0 - CLEANED=$(wl-paste $2 | sed 's/"/\\"/g') - ELLIPSIS= - if [ $(echo "${CLEANED}" | wc -c) -gt 32 ]; then - CLEANED=$(echo "${CLEANED}" | cut -zc'-29') - ELLIPSIS='...' - fi - print_bar_block "${CLEANED}" "" 0 - print_bar_block "${ELLIPSIS}]" "${COL_WHITE}" $3 - } - print_selection 'wl-paste' '' 0 - print_selection ' --primary' --primary -} - -print_online() { - print_conn() { - print_bar_block "$(echo $1 | cut -c1):" "" 0 - IP=$(ip --brief addr show | grep "$1" | sed -E 's/ +/\t/g' | cut -f3 | cut -f1 -d'/') - if [ -z "${IP}" ]; then - print_bar_block '-' - else - print_bar_block "${IP}" "${COL_WHITE}" "$2" - fi - } - print_conn enp - print_conn wlp 0 - set +e - STATUS_WIFI=$(nmcli -t -f IN-USE,SSID,SIGNAL dev wifi | grep '^\*:') - set -e - if [ ! -z "${STATUS_WIFI}" ]; then - SIGNAL=$(echo -n "${STATUS_WIFI}" | cut -d':' -f3) - COLOR=$(color_at $SIGNAL "45:${COL_RED}_85:${COL_YELLOW}_100:${COL_GREEN}") - print_bar_block " ${SIGNAL}" "${COLOR}" 0 - print_bar_block "% $(echo "${STATUS_WIFI}" | cut -d':' -f2)" - else - print_bar_block " " - fi -} - -print_battery() { - BAT_DIR="${SYSCLASS_DIR}/power_supply/BAT0" - - calc_percent () { - cat_energy() { - cat "${BAT_DIR}/energy_$1" - } - print_calc "100 * $(cat_energy $1) // $(cat_energy $2)" - } - - CHARGE=$(calc_percent now full) - COLOR=$(color_at $CHARGE "25:${COL_RED}_65:${COL_YELLOW}_100:${COL_GREEN}") - print_bar_block "${CHARGE}%" "${COLOR}" 0 - - COLOR="${COL_WHITE}" - STATUS=$(cat "${BAT_DIR}/status") - CHARGING=? - if [ "${STATUS}" = "Not charging" ]; then - CHARGING=- - elif [ "${STATUS}" = "Charging" ]; then - CHARGING=^ - COLOR="${COL_GREEN}" - elif [ "${STATUS}" = "Discharging" ]; then - CHARGING=v - COLOR="${COL_YELLOW}" - fi - print_bar_block "${CHARGING}" "${COLOR}" 0 - - print_bar_block "$(calc_percent full full_design)%" -} - -print_temperature() { - COLOR="${COL_WHITE}" - TEMPERATURE=$(cat ${SYSCLASS_DIR}/thermal/thermal_zone0/temp) - TEMPERATURE_IN_C=$(print_calc "${TEMPERATURE} // 1000") - COLOR=$(color_at $TEMPERATURE_IN_C "65:${COL_GREEN}_85:${COL_YELLOW}_999:${COL_RED}") - print_bar_block "${TEMPERATURE_IN_C}" "${COLOR}" 0 - print_bar_block '°' -} - -print_datetime() { - DATE=$(date +'%Y-%m-%d') - TIME=$(date +'%H:%M:%S') - TZ=$(date +'/%Z') - print_bar_block "${DATE} " "" 0 - print_bar_block "${TIME}" "${COL_WHITE}" 0 - print_bar_block "${TZ}" "" -} - -print_volume() { - print_bar_block "vol " '' 0 - VOLUME="$(pactl get-sink-volume 0 | head -1 | sed 's/ //g' | cut -d'/' -f2)" - if audio_dev_is_mute; then - print_bar_block "${VOLUME}" - else - print_bar_block "${VOLUME}" "${COL_YELLOW}" - fi -} - -print_keyboard() { - LAYOUT=$(swaymsg -t get_inputs | grep 'xkb_active_layout_name' | sed -E 's/[ ,"]+//g' | cut -d':' -f2 | head -1) - if [ "${LAYOUT}" = "English(US)" ]; then - LAYOUT=us - elif [ "${LAYOUT}" = "German" ]; then - LAYOUT=de - else - LAYOUT=?? - fi - print_bar_block "kb_${LAYOUT}" -} - -printf '{"version": 1}\n[' -while true; do - printf '[' - print_clipboard - print_online - print_battery - print_temperature - print_datetime - print_volume - print_keyboard - printf '],' - sleep 0.1 -done diff --git a/testing/__home/user/.gitconfig b/testing/__home/user/.gitconfig deleted file mode 100644 index 8967d25..0000000 --- a/testing/__home/user/.gitconfig +++ /dev/null @@ -1,3 +0,0 @@ -[user] - email = c.heller@plomlompom.de - name = Christian Heller diff --git a/testing/__home/user/.shell_prompt_color b/testing/__home/user/.shell_prompt_color deleted file mode 100644 index 0cfbf08..0000000 --- a/testing/__home/user/.shell_prompt_color +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/testing/copy/all/__home/plom/.bash_profile b/testing/copy/all/__home/plom/.bash_profile new file mode 120000 index 0000000..6d0c662 --- /dev/null +++ b/testing/copy/all/__home/plom/.bash_profile @@ -0,0 +1 @@ +../../../../../bookworm/copy/all/home/plom/.bash_profile \ No newline at end of file diff --git a/testing/copy/all/__home/plom/.bashrc b/testing/copy/all/__home/plom/.bashrc new file mode 120000 index 0000000..f142d7e --- /dev/null +++ b/testing/copy/all/__home/plom/.bashrc @@ -0,0 +1 @@ +../../../../../bookworm/copy/all/home/plom/.bashrc \ No newline at end of file diff --git a/testing/copy/all/__home/plom/.local/bin/LINK_ME b/testing/copy/all/__home/plom/.local/bin/LINK_ME new file mode 100644 index 0000000..6750cfc --- /dev/null +++ b/testing/copy/all/__home/plom/.local/bin/LINK_ME @@ -0,0 +1,2 @@ +../../.plomlib +lib diff --git a/testing/copy/all/__home/plom/.plomlib/file_dot_variants b/testing/copy/all/__home/plom/.plomlib/file_dot_variants new file mode 120000 index 0000000..326fd9d --- /dev/null +++ b/testing/copy/all/__home/plom/.plomlib/file_dot_variants @@ -0,0 +1 @@ +../../../../../../bookworm/copy/all/home/plom/.plomlib/file_dot_variants \ No newline at end of file diff --git a/testing/copy/all/__home/plom/.profile b/testing/copy/all/__home/plom/.profile new file mode 120000 index 0000000..d460c3f --- /dev/null +++ b/testing/copy/all/__home/plom/.profile @@ -0,0 +1 @@ +../../../../../bookworm/copy/all/home/plom/.profile \ No newline at end of file diff --git a/testing/copy/all/__root/.bash_profile b/testing/copy/all/__root/.bash_profile new file mode 120000 index 0000000..ecf4029 --- /dev/null +++ b/testing/copy/all/__root/.bash_profile @@ -0,0 +1 @@ +../home/plom/.bash_profile \ No newline at end of file diff --git a/testing/copy/all/__root/.bashrc b/testing/copy/all/__root/.bashrc new file mode 120000 index 0000000..9ebea20 --- /dev/null +++ b/testing/copy/all/__root/.bashrc @@ -0,0 +1 @@ +../home/plom/.bashrc \ No newline at end of file diff --git a/testing/copy/all/__root/.local b/testing/copy/all/__root/.local new file mode 120000 index 0000000..bad616a --- /dev/null +++ b/testing/copy/all/__root/.local @@ -0,0 +1 @@ +../home/plom/.local \ No newline at end of file diff --git a/testing/copy/all/__root/.plomlib b/testing/copy/all/__root/.plomlib new file mode 120000 index 0000000..76e877f --- /dev/null +++ b/testing/copy/all/__root/.plomlib @@ -0,0 +1 @@ +../home/plom/.plomlib \ No newline at end of file diff --git a/testing/copy/all/__root/.profile b/testing/copy/all/__root/.profile new file mode 120000 index 0000000..edcf39c --- /dev/null +++ b/testing/copy/all/__root/.profile @@ -0,0 +1 @@ +../home/plom/.profile \ No newline at end of file diff --git a/testing/copy/all/__root/.shell_prompt_color b/testing/copy/all/__root/.shell_prompt_color new file mode 120000 index 0000000..e86be85 --- /dev/null +++ b/testing/copy/all/__root/.shell_prompt_color @@ -0,0 +1 @@ +../../../../bookworm/copy/all/root/.shell_prompt_color \ No newline at end of file diff --git a/testing/copy/all/etc/apt/__apt.conf.d/99_minimize_dependencies b/testing/copy/all/etc/apt/__apt.conf.d/99_minimize_dependencies new file mode 120000 index 0000000..086a699 --- /dev/null +++ b/testing/copy/all/etc/apt/__apt.conf.d/99_minimize_dependencies @@ -0,0 +1 @@ +../../../../../../bookworm/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies \ No newline at end of file diff --git a/testing/copy/all/etc/apt/apt.conf.d b/testing/copy/all/etc/apt/apt.conf.d new file mode 120000 index 0000000..b8a462f --- /dev/null +++ b/testing/copy/all/etc/apt/apt.conf.d @@ -0,0 +1 @@ +../../../../../bookworm/copy/all/etc/apt/apt.conf.d \ No newline at end of file diff --git a/testing/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies b/testing/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies deleted file mode 120000 index 086a699..0000000 --- a/testing/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies +++ /dev/null @@ -1 +0,0 @@ -../../../../../../bookworm/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies \ No newline at end of file diff --git a/testing/copy/all/home b/testing/copy/all/home new file mode 120000 index 0000000..0016e74 --- /dev/null +++ b/testing/copy/all/home @@ -0,0 +1 @@ +../../../bookworm/copy/all/home \ No newline at end of file diff --git a/testing/copy/all/home/plom/.bash_profile b/testing/copy/all/home/plom/.bash_profile deleted file mode 120000 index 6d0c662..0000000 --- a/testing/copy/all/home/plom/.bash_profile +++ /dev/null @@ -1 +0,0 @@ -../../../../../bookworm/copy/all/home/plom/.bash_profile \ No newline at end of file diff --git a/testing/copy/all/home/plom/.bashrc b/testing/copy/all/home/plom/.bashrc deleted file mode 120000 index f142d7e..0000000 --- a/testing/copy/all/home/plom/.bashrc +++ /dev/null @@ -1 +0,0 @@ -../../../../../bookworm/copy/all/home/plom/.bashrc \ No newline at end of file diff --git a/testing/copy/all/home/plom/.local/bin/LINK_ME b/testing/copy/all/home/plom/.local/bin/LINK_ME deleted file mode 100644 index 6750cfc..0000000 --- a/testing/copy/all/home/plom/.local/bin/LINK_ME +++ /dev/null @@ -1,2 +0,0 @@ -../../.plomlib -lib diff --git a/testing/copy/all/home/plom/.plomlib/file_dot_variants b/testing/copy/all/home/plom/.plomlib/file_dot_variants deleted file mode 120000 index 326fd9d..0000000 --- a/testing/copy/all/home/plom/.plomlib/file_dot_variants +++ /dev/null @@ -1 +0,0 @@ -../../../../../../bookworm/copy/all/home/plom/.plomlib/file_dot_variants \ No newline at end of file diff --git a/testing/copy/all/home/plom/.profile b/testing/copy/all/home/plom/.profile deleted file mode 120000 index d460c3f..0000000 --- a/testing/copy/all/home/plom/.profile +++ /dev/null @@ -1 +0,0 @@ -../../../../../bookworm/copy/all/home/plom/.profile \ No newline at end of file diff --git a/testing/copy/all/root b/testing/copy/all/root new file mode 120000 index 0000000..ab75fb1 --- /dev/null +++ b/testing/copy/all/root @@ -0,0 +1 @@ +../../../bookworm/copy/all/root \ No newline at end of file diff --git a/testing/copy/all/root/.bash_profile b/testing/copy/all/root/.bash_profile deleted file mode 120000 index ecf4029..0000000 --- a/testing/copy/all/root/.bash_profile +++ /dev/null @@ -1 +0,0 @@ -../home/plom/.bash_profile \ No newline at end of file diff --git a/testing/copy/all/root/.bashrc b/testing/copy/all/root/.bashrc deleted file mode 120000 index 9ebea20..0000000 --- a/testing/copy/all/root/.bashrc +++ /dev/null @@ -1 +0,0 @@ -../home/plom/.bashrc \ No newline at end of file diff --git a/testing/copy/all/root/.local b/testing/copy/all/root/.local deleted file mode 120000 index bad616a..0000000 --- a/testing/copy/all/root/.local +++ /dev/null @@ -1 +0,0 @@ -../home/plom/.local \ No newline at end of file diff --git a/testing/copy/all/root/.plomlib b/testing/copy/all/root/.plomlib deleted file mode 120000 index 76e877f..0000000 --- a/testing/copy/all/root/.plomlib +++ /dev/null @@ -1 +0,0 @@ -../home/plom/.plomlib \ No newline at end of file diff --git a/testing/copy/all/root/.profile b/testing/copy/all/root/.profile deleted file mode 120000 index edcf39c..0000000 --- a/testing/copy/all/root/.profile +++ /dev/null @@ -1 +0,0 @@ -../home/plom/.profile \ No newline at end of file diff --git a/testing/copy/all/root/.shell_prompt_color b/testing/copy/all/root/.shell_prompt_color deleted file mode 120000 index e86be85..0000000 --- a/testing/copy/all/root/.shell_prompt_color +++ /dev/null @@ -1 +0,0 @@ -../../../../bookworm/copy/all/root/.shell_prompt_color \ No newline at end of file diff --git a/testing/scripts/setup_desktop.sh b/testing/scripts/setup_desktop.sh index 4f8e0b0..18018d9 100755 --- a/testing/scripts/setup_desktop.sh +++ b/testing/scripts/setup_desktop.sh @@ -10,11 +10,11 @@ cd $(dirname "$0") . lib/init_packages . lib/put_finished_marker . lib/setup_user +. lib/set_hostname_and_hosts PATH_NETWORK_INTERFACES="${PATH_ETC}/network/interfaces" PATH_ETC_APT="${PATH_ETC}/apt" PATH_ETC_APT_CONF=${PATH_ETC_APT}/apt.conf.d -PATH_HOSTS="${PATH_ETC}/hosts" abort_if_offline @@ -82,9 +82,6 @@ echo "\nUpgrading to testing." cp "${PATH_COPY_TAG_ALL}${PATH_ETC_APT_CONF}/99_minimize_dependencies" "${PATH_ETC_APT_CONF}/" upgrade_from_older_release -init_packages "${INSTALL_TAGS}" -setup_user - # NB: This *needs* to come before steps potentially overwriting /etc/network/interfaces. if [ "$(nmcli -f TYPE conn | grep 'wifi' | wc -l)" = "0" ]; then echo "\nChecking for existing wifi config in ${PATH_NETWORK_INTERFACES}." @@ -93,21 +90,20 @@ else echo "\nAlready know wifi connection, nothing to add." fi +init_packages "${INSTALL_TAGS}" +setup_user + echo '\nCopying over files, directories.' copy_dirtrees_of_tags ${INSTALL_TAGS} -echo "\nSetting hostname and FQDN." -echo "${SYSTEM_NAME}" > "${PATH_ETC}/hostname" -hostname "${SYSTEM_NAME}" -sed -i 's/REPLACE_WITH_FQDN/REPLACE_WITH_HOSTNAME.local REPLACE_WITH_HOSTNAME.localdomain/g' "${PATH_HOSTS}" -sed -i 's/REPLACE_WITH_HOSTNAME/'"${SYSTEM_NAME}"'/g' "${PATH_HOSTS}" - -echo "\nEnsuring our desired locale is available." -locale-gen +set_hostname_and_hosts "${SYSTEM_NAME}" echo '\nSyncing clock.' ntpdate-debian -s +echo "\nEnsuring our desired locale is available." +locale-gen + echo '\nFinal user setup.' adduser --quiet plom plugdev # so user may use pmount passwd "${USERNAME}"