From f2667135a3023cd26ee200df5316f506f03f4384 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 17 Apr 2025 21:53:17 +0200 Subject: [PATCH] Major refactor. --- .../apt/apt.conf.d/99_minimize_dependencies | 0 bookworm/{etc => __etc}/all/apt/sources.list | 0 bookworm/{etc => __etc}/caddy/caddy/Caddyfile | 0 .../catgirl/systemd/system/catgirl.service | 0 .../system/encrypt_catgirl_logs.service | 0 .../systemd/system/encrypt_catgirl_logs.timer | 0 .../seedbox/systemd/system/rtorrent.service | 17 + bookworm/{etc => __etc}/server/nftables.conf | 0 .../{etc => __etc}/server/ssh/sshd_config | 0 bookworm/{home => __home}/all/.bash_profile | 0 bookworm/{home => __home}/all/.bashrc | 0 bookworm/__home/all/.local/bin/lib | 1 + .../all/.plomlib/file_dot_variants | 0 bookworm/{home => __home}/all/.profile | 0 .../catgirl/.config/catgirl/libera | 0 .../catgirl/.local/bin/encrypt_catgirl_logs | 4 +- .../catgirl/.local/share/catgirl/KILL_ME | 0 .../{home => __home}/catgirl/.plomlib/abort | 0 .../catgirl/.plomlib/constants_user | 0 .../catgirl/.plomlib/encrypt_with.pub | 0 .../catgirl/.plomlib/expect_n_args | 0 .../{home => __home}/root/.shell_prompt_color | 0 bookworm/__home/seedbox/.rtorrent.rc | 11 + bookworm/__home/seedbox/downloads/KILL_ME | 0 bookworm/__home/seedbox/seedbox/KILL_ME | 0 bookworm/aptmark/seedbox | 5 + bookworm/copy/all/etc/LINK_ME__localtime | 2 + .../apt/apt.conf.d/99_minimize_dependencies | 4 + bookworm/copy/all/etc/apt/sources.list | 4 + bookworm/copy/all/home/plom/.bash_profile | 8 + bookworm/copy/all/home/plom/.bashrc | 29 ++ .../copy/all/home/plom/.local/bin/LINK_ME | 2 + .../all/home/plom/.plomlib/file_dot_variants | 7 + bookworm/copy/all/home/plom/.profile | 20 + bookworm/copy/all/root/.bash_profile | 1 + bookworm/copy/all/root/.bashrc | 1 + bookworm/copy/all/root/.local | 1 + bookworm/copy/all/root/.plomlib | 1 + bookworm/copy/all/root/.profile | 1 + bookworm/copy/all/root/.shell_prompt_color | 1 + bookworm/copy/caddy/etc/caddy/Caddyfile | 7 + .../etc/systemd/system/catgirl.service | 15 + .../system/encrypt_catgirl_logs.service | 8 + .../systemd/system/encrypt_catgirl_logs.timer | 9 + .../catgirl/home/plom/.config/catgirl/libera | 4 + .../home/plom/.local/bin/encrypt_catgirl_logs | 36 ++ .../home/plom/.local/share/catgirl/KILL_ME | 0 .../copy/catgirl/home/plom/.plomlib/abort | 1 + .../catgirl/home/plom/.plomlib/constants_user | 1 + .../home/plom/.plomlib/encrypt_with.pub | 1 + .../catgirl/home/plom/.plomlib/expect_n_args | 1 + .../etc/systemd/system/rtorrent.service | 17 + .../copy/seedbox/home/plom/downloads/KILL_ME | 0 .../copy/seedbox/home/plom/seedbox/KILL_ME | 0 bookworm/copy/server/etc/nftables.conf | 46 ++ bookworm/copy/server/etc/ssh/sshd_config | 123 +++++ .../home/catgirl/.plomlib/constants_catgirl | 1 - bookworm/scripts/lib/constants_catgirl | 4 - bookworm/scripts/lib/copy_dirtree | 31 -- bookworm/scripts/lib/copy_dirtrees_of_tags | 57 +++ bookworm/scripts/lib/ensure_etc_of_tags | 8 - bookworm/scripts/lib/ensure_homefiles_of_tags | 6 - bookworm/scripts/lib/mkdir_p_for_user | 10 - bookworm/scripts/lib/setup_user | 7 + bookworm/scripts/lib/setup_users | 24 - bookworm/scripts/setup_catgirl.sh | 19 +- bookworm/scripts/setup_seedbox.sh | 16 + bookworm/scripts/setup_server.sh | 20 +- .../apt/apt.conf.d/99_minimize_dependencies | 0 testing/{etc => __etc}/all/apt/sources.list | 0 testing/{etc => __etc}/all/locale.conf | 0 testing/{etc => __etc}/all/locale.gen | 0 testing/{etc => __etc}/all/timezone | 0 .../{etc => __etc}/desktop/network/interfaces | 0 testing/{home => __home}/all/.bash_profile | 0 testing/{home => __home}/all/.bashrc | 0 .../all/.plomlib/file_dot_variants | 0 testing/{home => __home}/all/.profile | 0 .../{home => __home}/desktop/.bashrc.desktop | 0 .../desktop/.config/sway/config | 0 .../desktop/.local/bin/borgplom | 0 .../desktop/.local/bin/make_secrets | 0 .../{home => __home}/desktop/.local/bin/vol | 0 .../{home => __home}/desktop/.plomlib/abort | 0 .../desktop/.plomlib/abort_if_exists | 0 .../desktop/.plomlib/audio_dev_is_mute | 0 .../desktop/.plomlib/constants_borg | 0 .../desktop/.plomlib/constants_secrets | 0 .../desktop/.plomlib/constants_ssh | 0 .../desktop/.plomlib/constants_user | 0 .../desktop/.plomlib/expect_min_n_args | 0 .../desktop/.plomlib/expect_n_args | 0 .../desktop/.plomlib/get_passphrase | 0 .../desktop/.plomlib/mount_secrets | 0 .../desktop/.plomlib/path_tmp_timestamped | 0 .../desktop/.plomlib/print_usage | 0 .../desktop/.plomlib/retry_until | 0 .../{home => __home}/desktop/.profile.desktop | 0 testing/{home => __home}/desktop/.tridactylrc | 0 .../{home => __home}/root/.shell_prompt_color | 0 .../t490s/.nonpath_bins/status.sh | 0 testing/{home => __home}/user/.gitconfig | 0 .../{home => __home}/user/.shell_prompt_color | 0 .../apt/apt.conf.d/99_minimize_dependencies | 1 + testing/copy/all/etc/apt/sources.list | 2 + testing/copy/all/etc/locale.conf | 1 + testing/copy/all/etc/locale.gen | 483 ++++++++++++++++++ testing/copy/all/etc/timezone | 1 + testing/copy/all/home/plom/.bash_profile | 1 + testing/copy/all/home/plom/.bashrc | 1 + testing/copy/all/home/plom/.local/bin/LINK_ME | 2 + .../all/home/plom/.plomlib/file_dot_variants | 1 + testing/copy/all/home/plom/.profile | 1 + testing/copy/all/root/.bash_profile | 1 + testing/copy/all/root/.bashrc | 1 + testing/copy/all/root/.local | 1 + testing/copy/all/root/.plomlib | 1 + testing/copy/all/root/.profile | 1 + testing/copy/all/root/.shell_prompt_color | 1 + testing/copy/desktop/etc/network/interfaces | 10 + .../copy/desktop/home/plom/.bashrc.desktop | 4 + .../desktop/home/plom/.config/sway/config | 91 ++++ .../desktop/home/plom/.local/bin/borgplom | 221 ++++++++ .../desktop/home/plom/.local/bin/make_secrets | 28 + testing/copy/desktop/home/plom/.local/bin/vol | 56 ++ testing/copy/desktop/home/plom/.plomlib/abort | 1 + .../home/plom/.plomlib/abort_if_exists | 1 + .../home/plom/.plomlib/audio_dev_is_mute | 3 + .../desktop/home/plom/.plomlib/constants_borg | 1 + .../home/plom/.plomlib/constants_secrets | 1 + .../desktop/home/plom/.plomlib/constants_ssh | 1 + .../desktop/home/plom/.plomlib/constants_user | 1 + .../home/plom/.plomlib/expect_min_n_args | 1 + .../desktop/home/plom/.plomlib/expect_n_args | 1 + .../desktop/home/plom/.plomlib/get_passphrase | 1 + .../desktop/home/plom/.plomlib/mount_secrets | 1 + .../home/plom/.plomlib/path_tmp_timestamped | 1 + .../desktop/home/plom/.plomlib/print_usage | 37 ++ .../desktop/home/plom/.plomlib/retry_until | 1 + .../copy/desktop/home/plom/.profile.desktop | 6 + testing/copy/desktop/home/plom/.tridactylrc | 17 + .../t490s/home/plom/.nonpath_bins/status.sh | 175 +++++++ testing/copy/user/home/plom/.gitconfig | 3 + .../copy/user/home/plom/.shell_prompt_color | 1 + testing/scripts/lib/copy_dirtree | 1 - testing/scripts/lib/ensure_etc_of_tags | 1 - testing/scripts/lib/ensure_homefiles_of_tags | 1 - testing/scripts/lib/mkdir_p_for_user | 1 - testing/scripts/lib/setup_user | 1 + testing/scripts/lib/setup_users | 1 - testing/scripts/setup_desktop.sh | 18 +- 151 files changed, 1655 insertions(+), 125 deletions(-) rename bookworm/{etc => __etc}/all/apt/apt.conf.d/99_minimize_dependencies (100%) rename bookworm/{etc => __etc}/all/apt/sources.list (100%) rename bookworm/{etc => __etc}/caddy/caddy/Caddyfile (100%) rename bookworm/{etc => __etc}/catgirl/systemd/system/catgirl.service (100%) rename bookworm/{etc => __etc}/catgirl/systemd/system/encrypt_catgirl_logs.service (100%) rename bookworm/{etc => __etc}/catgirl/systemd/system/encrypt_catgirl_logs.timer (100%) create mode 100644 bookworm/__etc/seedbox/systemd/system/rtorrent.service rename bookworm/{etc => __etc}/server/nftables.conf (100%) rename bookworm/{etc => __etc}/server/ssh/sshd_config (100%) rename bookworm/{home => __home}/all/.bash_profile (100%) rename bookworm/{home => __home}/all/.bashrc (100%) create mode 120000 bookworm/__home/all/.local/bin/lib rename bookworm/{home => __home}/all/.plomlib/file_dot_variants (100%) rename bookworm/{home => __home}/all/.profile (100%) rename bookworm/{home => __home}/catgirl/.config/catgirl/libera (100%) rename bookworm/{home => __home}/catgirl/.local/bin/encrypt_catgirl_logs (92%) create mode 100644 bookworm/__home/catgirl/.local/share/catgirl/KILL_ME rename bookworm/{home => __home}/catgirl/.plomlib/abort (100%) rename bookworm/{home => __home}/catgirl/.plomlib/constants_user (100%) rename bookworm/{home => __home}/catgirl/.plomlib/encrypt_with.pub (100%) rename bookworm/{home => __home}/catgirl/.plomlib/expect_n_args (100%) rename bookworm/{home => __home}/root/.shell_prompt_color (100%) create mode 100644 bookworm/__home/seedbox/.rtorrent.rc create mode 100644 bookworm/__home/seedbox/downloads/KILL_ME create mode 100644 bookworm/__home/seedbox/seedbox/KILL_ME create mode 100644 bookworm/aptmark/seedbox create mode 100644 bookworm/copy/all/etc/LINK_ME__localtime create mode 100644 bookworm/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies create mode 100644 bookworm/copy/all/etc/apt/sources.list create mode 100644 bookworm/copy/all/home/plom/.bash_profile create mode 100644 bookworm/copy/all/home/plom/.bashrc create mode 100644 bookworm/copy/all/home/plom/.local/bin/LINK_ME create mode 100644 bookworm/copy/all/home/plom/.plomlib/file_dot_variants create mode 100644 bookworm/copy/all/home/plom/.profile create mode 120000 bookworm/copy/all/root/.bash_profile create mode 120000 bookworm/copy/all/root/.bashrc create mode 120000 bookworm/copy/all/root/.local create mode 120000 bookworm/copy/all/root/.plomlib create mode 120000 bookworm/copy/all/root/.profile create mode 100644 bookworm/copy/all/root/.shell_prompt_color create mode 100644 bookworm/copy/caddy/etc/caddy/Caddyfile create mode 100644 bookworm/copy/catgirl/etc/systemd/system/catgirl.service create mode 100644 bookworm/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.service create mode 100644 bookworm/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.timer create mode 100644 bookworm/copy/catgirl/home/plom/.config/catgirl/libera create mode 100755 bookworm/copy/catgirl/home/plom/.local/bin/encrypt_catgirl_logs create mode 100644 bookworm/copy/catgirl/home/plom/.local/share/catgirl/KILL_ME create mode 120000 bookworm/copy/catgirl/home/plom/.plomlib/abort create mode 120000 bookworm/copy/catgirl/home/plom/.plomlib/constants_user create mode 100644 bookworm/copy/catgirl/home/plom/.plomlib/encrypt_with.pub create mode 120000 bookworm/copy/catgirl/home/plom/.plomlib/expect_n_args create mode 100644 bookworm/copy/seedbox/etc/systemd/system/rtorrent.service create mode 100644 bookworm/copy/seedbox/home/plom/downloads/KILL_ME create mode 100644 bookworm/copy/seedbox/home/plom/seedbox/KILL_ME create mode 100755 bookworm/copy/server/etc/nftables.conf create mode 100644 bookworm/copy/server/etc/ssh/sshd_config delete mode 120000 bookworm/home/catgirl/.plomlib/constants_catgirl delete mode 100644 bookworm/scripts/lib/constants_catgirl delete mode 100644 bookworm/scripts/lib/copy_dirtree create mode 100644 bookworm/scripts/lib/copy_dirtrees_of_tags delete mode 100644 bookworm/scripts/lib/ensure_etc_of_tags delete mode 100644 bookworm/scripts/lib/ensure_homefiles_of_tags delete mode 100644 bookworm/scripts/lib/mkdir_p_for_user create mode 100644 bookworm/scripts/lib/setup_user delete mode 100644 bookworm/scripts/lib/setup_users create mode 100644 bookworm/scripts/setup_seedbox.sh rename testing/{etc => __etc}/all/apt/apt.conf.d/99_minimize_dependencies (100%) rename testing/{etc => __etc}/all/apt/sources.list (100%) rename testing/{etc => __etc}/all/locale.conf (100%) rename testing/{etc => __etc}/all/locale.gen (100%) rename testing/{etc => __etc}/all/timezone (100%) rename testing/{etc => __etc}/desktop/network/interfaces (100%) rename testing/{home => __home}/all/.bash_profile (100%) rename testing/{home => __home}/all/.bashrc (100%) rename testing/{home => __home}/all/.plomlib/file_dot_variants (100%) rename testing/{home => __home}/all/.profile (100%) rename testing/{home => __home}/desktop/.bashrc.desktop (100%) rename testing/{home => __home}/desktop/.config/sway/config (100%) rename testing/{home => __home}/desktop/.local/bin/borgplom (100%) rename testing/{home => __home}/desktop/.local/bin/make_secrets (100%) rename testing/{home => __home}/desktop/.local/bin/vol (100%) rename testing/{home => __home}/desktop/.plomlib/abort (100%) rename testing/{home => __home}/desktop/.plomlib/abort_if_exists (100%) rename testing/{home => __home}/desktop/.plomlib/audio_dev_is_mute (100%) rename testing/{home => __home}/desktop/.plomlib/constants_borg (100%) rename testing/{home => __home}/desktop/.plomlib/constants_secrets (100%) rename testing/{home => __home}/desktop/.plomlib/constants_ssh (100%) rename testing/{home => __home}/desktop/.plomlib/constants_user (100%) rename testing/{home => __home}/desktop/.plomlib/expect_min_n_args (100%) rename testing/{home => __home}/desktop/.plomlib/expect_n_args (100%) rename testing/{home => __home}/desktop/.plomlib/get_passphrase (100%) rename testing/{home => __home}/desktop/.plomlib/mount_secrets (100%) rename testing/{home => __home}/desktop/.plomlib/path_tmp_timestamped (100%) rename testing/{home => __home}/desktop/.plomlib/print_usage (100%) rename testing/{home => __home}/desktop/.plomlib/retry_until (100%) rename testing/{home => __home}/desktop/.profile.desktop (100%) rename testing/{home => __home}/desktop/.tridactylrc (100%) rename testing/{home => __home}/root/.shell_prompt_color (100%) rename testing/{home => __home}/t490s/.nonpath_bins/status.sh (100%) rename testing/{home => __home}/user/.gitconfig (100%) rename testing/{home => __home}/user/.shell_prompt_color (100%) create mode 120000 testing/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies create mode 100644 testing/copy/all/etc/apt/sources.list create mode 100644 testing/copy/all/etc/locale.conf create mode 100644 testing/copy/all/etc/locale.gen create mode 100644 testing/copy/all/etc/timezone create mode 120000 testing/copy/all/home/plom/.bash_profile create mode 120000 testing/copy/all/home/plom/.bashrc create mode 100644 testing/copy/all/home/plom/.local/bin/LINK_ME create mode 120000 testing/copy/all/home/plom/.plomlib/file_dot_variants create mode 120000 testing/copy/all/home/plom/.profile create mode 120000 testing/copy/all/root/.bash_profile create mode 120000 testing/copy/all/root/.bashrc create mode 120000 testing/copy/all/root/.local create mode 120000 testing/copy/all/root/.plomlib create mode 120000 testing/copy/all/root/.profile create mode 120000 testing/copy/all/root/.shell_prompt_color create mode 100644 testing/copy/desktop/etc/network/interfaces create mode 100644 testing/copy/desktop/home/plom/.bashrc.desktop create mode 100644 testing/copy/desktop/home/plom/.config/sway/config create mode 100755 testing/copy/desktop/home/plom/.local/bin/borgplom create mode 100755 testing/copy/desktop/home/plom/.local/bin/make_secrets create mode 100755 testing/copy/desktop/home/plom/.local/bin/vol create mode 120000 testing/copy/desktop/home/plom/.plomlib/abort create mode 120000 testing/copy/desktop/home/plom/.plomlib/abort_if_exists create mode 100644 testing/copy/desktop/home/plom/.plomlib/audio_dev_is_mute create mode 120000 testing/copy/desktop/home/plom/.plomlib/constants_borg create mode 120000 testing/copy/desktop/home/plom/.plomlib/constants_secrets create mode 120000 testing/copy/desktop/home/plom/.plomlib/constants_ssh create mode 120000 testing/copy/desktop/home/plom/.plomlib/constants_user create mode 120000 testing/copy/desktop/home/plom/.plomlib/expect_min_n_args create mode 120000 testing/copy/desktop/home/plom/.plomlib/expect_n_args create mode 120000 testing/copy/desktop/home/plom/.plomlib/get_passphrase create mode 120000 testing/copy/desktop/home/plom/.plomlib/mount_secrets create mode 120000 testing/copy/desktop/home/plom/.plomlib/path_tmp_timestamped create mode 100644 testing/copy/desktop/home/plom/.plomlib/print_usage create mode 120000 testing/copy/desktop/home/plom/.plomlib/retry_until create mode 100644 testing/copy/desktop/home/plom/.profile.desktop create mode 100644 testing/copy/desktop/home/plom/.tridactylrc create mode 100755 testing/copy/t490s/home/plom/.nonpath_bins/status.sh create mode 100644 testing/copy/user/home/plom/.gitconfig create mode 100644 testing/copy/user/home/plom/.shell_prompt_color delete mode 120000 testing/scripts/lib/copy_dirtree delete mode 120000 testing/scripts/lib/ensure_etc_of_tags delete mode 120000 testing/scripts/lib/ensure_homefiles_of_tags delete mode 120000 testing/scripts/lib/mkdir_p_for_user create mode 120000 testing/scripts/lib/setup_user delete mode 120000 testing/scripts/lib/setup_users diff --git a/bookworm/etc/all/apt/apt.conf.d/99_minimize_dependencies b/bookworm/__etc/all/apt/apt.conf.d/99_minimize_dependencies similarity index 100% rename from bookworm/etc/all/apt/apt.conf.d/99_minimize_dependencies rename to bookworm/__etc/all/apt/apt.conf.d/99_minimize_dependencies diff --git a/bookworm/etc/all/apt/sources.list b/bookworm/__etc/all/apt/sources.list similarity index 100% rename from bookworm/etc/all/apt/sources.list rename to bookworm/__etc/all/apt/sources.list diff --git a/bookworm/etc/caddy/caddy/Caddyfile b/bookworm/__etc/caddy/caddy/Caddyfile similarity index 100% rename from bookworm/etc/caddy/caddy/Caddyfile rename to bookworm/__etc/caddy/caddy/Caddyfile diff --git a/bookworm/etc/catgirl/systemd/system/catgirl.service b/bookworm/__etc/catgirl/systemd/system/catgirl.service similarity index 100% rename from bookworm/etc/catgirl/systemd/system/catgirl.service rename to bookworm/__etc/catgirl/systemd/system/catgirl.service diff --git a/bookworm/etc/catgirl/systemd/system/encrypt_catgirl_logs.service b/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.service similarity index 100% rename from bookworm/etc/catgirl/systemd/system/encrypt_catgirl_logs.service rename to bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.service diff --git a/bookworm/etc/catgirl/systemd/system/encrypt_catgirl_logs.timer b/bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.timer similarity index 100% rename from bookworm/etc/catgirl/systemd/system/encrypt_catgirl_logs.timer rename to bookworm/__etc/catgirl/systemd/system/encrypt_catgirl_logs.timer diff --git a/bookworm/__etc/seedbox/systemd/system/rtorrent.service b/bookworm/__etc/seedbox/systemd/system/rtorrent.service new file mode 100644 index 0000000..9b98821 --- /dev/null +++ b/bookworm/__etc/seedbox/systemd/system/rtorrent.service @@ -0,0 +1,17 @@ +[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 similarity index 100% rename from bookworm/etc/server/nftables.conf rename to bookworm/__etc/server/nftables.conf diff --git a/bookworm/etc/server/ssh/sshd_config b/bookworm/__etc/server/ssh/sshd_config similarity index 100% rename from bookworm/etc/server/ssh/sshd_config rename to bookworm/__etc/server/ssh/sshd_config diff --git a/bookworm/home/all/.bash_profile b/bookworm/__home/all/.bash_profile similarity index 100% rename from bookworm/home/all/.bash_profile rename to bookworm/__home/all/.bash_profile diff --git a/bookworm/home/all/.bashrc b/bookworm/__home/all/.bashrc similarity index 100% rename from bookworm/home/all/.bashrc rename to bookworm/__home/all/.bashrc diff --git a/bookworm/__home/all/.local/bin/lib b/bookworm/__home/all/.local/bin/lib new file mode 120000 index 0000000..8009c2a --- /dev/null +++ b/bookworm/__home/all/.local/bin/lib @@ -0,0 +1 @@ +../../.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 similarity index 100% rename from bookworm/home/all/.plomlib/file_dot_variants rename to bookworm/__home/all/.plomlib/file_dot_variants diff --git a/bookworm/home/all/.profile b/bookworm/__home/all/.profile similarity index 100% rename from bookworm/home/all/.profile rename to bookworm/__home/all/.profile diff --git a/bookworm/home/catgirl/.config/catgirl/libera b/bookworm/__home/catgirl/.config/catgirl/libera similarity index 100% rename from bookworm/home/catgirl/.config/catgirl/libera rename to bookworm/__home/catgirl/.config/catgirl/libera diff --git a/bookworm/home/catgirl/.local/bin/encrypt_catgirl_logs b/bookworm/__home/catgirl/.local/bin/encrypt_catgirl_logs similarity index 92% rename from bookworm/home/catgirl/.local/bin/encrypt_catgirl_logs rename to bookworm/__home/catgirl/.local/bin/encrypt_catgirl_logs index c0b8866..e6da887 100755 --- a/bookworm/home/catgirl/.local/bin/encrypt_catgirl_logs +++ b/bookworm/__home/catgirl/.local/bin/encrypt_catgirl_logs @@ -2,13 +2,13 @@ set -e cd $(dirname "$0") . lib/expect_n_args -. lib/constants_catgirl # PATH_USER_SHARE_CATGIRL expect_n_args 0 0 '' -PATH_LOGS="${PATH_USER_SHARE_CATGIRL}/log" +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)" diff --git a/bookworm/__home/catgirl/.local/share/catgirl/KILL_ME b/bookworm/__home/catgirl/.local/share/catgirl/KILL_ME new file mode 100644 index 0000000..e69de29 diff --git a/bookworm/home/catgirl/.plomlib/abort b/bookworm/__home/catgirl/.plomlib/abort similarity index 100% rename from bookworm/home/catgirl/.plomlib/abort rename to bookworm/__home/catgirl/.plomlib/abort diff --git a/bookworm/home/catgirl/.plomlib/constants_user b/bookworm/__home/catgirl/.plomlib/constants_user similarity index 100% rename from bookworm/home/catgirl/.plomlib/constants_user rename to bookworm/__home/catgirl/.plomlib/constants_user diff --git a/bookworm/home/catgirl/.plomlib/encrypt_with.pub b/bookworm/__home/catgirl/.plomlib/encrypt_with.pub similarity index 100% rename from bookworm/home/catgirl/.plomlib/encrypt_with.pub rename to bookworm/__home/catgirl/.plomlib/encrypt_with.pub diff --git a/bookworm/home/catgirl/.plomlib/expect_n_args b/bookworm/__home/catgirl/.plomlib/expect_n_args similarity index 100% rename from bookworm/home/catgirl/.plomlib/expect_n_args rename to bookworm/__home/catgirl/.plomlib/expect_n_args diff --git a/bookworm/home/root/.shell_prompt_color b/bookworm/__home/root/.shell_prompt_color similarity index 100% rename from bookworm/home/root/.shell_prompt_color rename to bookworm/__home/root/.shell_prompt_color diff --git a/bookworm/__home/seedbox/.rtorrent.rc b/bookworm/__home/seedbox/.rtorrent.rc new file mode 100644 index 0000000..2513748 --- /dev/null +++ b/bookworm/__home/seedbox/.rtorrent.rc @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 0000000..e69de29 diff --git a/bookworm/__home/seedbox/seedbox/KILL_ME b/bookworm/__home/seedbox/seedbox/KILL_ME new file mode 100644 index 0000000..e69de29 diff --git a/bookworm/aptmark/seedbox b/bookworm/aptmark/seedbox new file mode 100644 index 0000000..bf62354 --- /dev/null +++ b/bookworm/aptmark/seedbox @@ -0,0 +1,5 @@ +# needed for torrenting +rtorrent +# needed for torrenting session +tmux +# diff --git a/bookworm/copy/all/etc/LINK_ME__localtime b/bookworm/copy/all/etc/LINK_ME__localtime new file mode 100644 index 0000000..fa9f52f --- /dev/null +++ b/bookworm/copy/all/etc/LINK_ME__localtime @@ -0,0 +1,2 @@ +/usr/share/zoneinfo/Europe/Berlin +localtime diff --git a/bookworm/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies b/bookworm/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies new file mode 100644 index 0000000..4aaef79 --- /dev/null +++ b/bookworm/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies @@ -0,0 +1,4 @@ +APT::AutoRemove::RecommendsImportant "false"; +APT::AutoRemove::SuggestsImportant "false"; +APT::Install-Recommends "false"; +APT::Install-Suggests "false"; diff --git a/bookworm/copy/all/etc/apt/sources.list b/bookworm/copy/all/etc/apt/sources.list new file mode 100644 index 0000000..72b0ffb --- /dev/null +++ b/bookworm/copy/all/etc/apt/sources.list @@ -0,0 +1,4 @@ +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/copy/all/home/plom/.bash_profile b/bookworm/copy/all/home/plom/.bash_profile new file mode 100644 index 0000000..316cf19 --- /dev/null +++ b/bookworm/copy/all/home/plom/.bash_profile @@ -0,0 +1,8 @@ +# ~/.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/copy/all/home/plom/.bashrc b/bookworm/copy/all/home/plom/.bashrc new file mode 100644 index 0000000..e748315 --- /dev/null +++ b/bookworm/copy/all/home/plom/.bashrc @@ -0,0 +1,29 @@ +# ~/.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/copy/all/home/plom/.local/bin/LINK_ME b/bookworm/copy/all/home/plom/.local/bin/LINK_ME new file mode 100644 index 0000000..6750cfc --- /dev/null +++ b/bookworm/copy/all/home/plom/.local/bin/LINK_ME @@ -0,0 +1,2 @@ +../../.plomlib +lib diff --git a/bookworm/copy/all/home/plom/.plomlib/file_dot_variants b/bookworm/copy/all/home/plom/.plomlib/file_dot_variants new file mode 100644 index 0000000..1c1bf69 --- /dev/null +++ b/bookworm/copy/all/home/plom/.plomlib/file_dot_variants @@ -0,0 +1,7 @@ +file_dot_variants() { + for FILE in ${1}\.*; do + if [ -f "${FILE}" ]; then + . "${FILE}" + fi + done +} diff --git a/bookworm/copy/all/home/plom/.profile b/bookworm/copy/all/home/plom/.profile new file mode 100644 index 0000000..51acedd --- /dev/null +++ b/bookworm/copy/all/home/plom/.profile @@ -0,0 +1,20 @@ +# ~/.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/copy/all/root/.bash_profile b/bookworm/copy/all/root/.bash_profile new file mode 120000 index 0000000..ecf4029 --- /dev/null +++ b/bookworm/copy/all/root/.bash_profile @@ -0,0 +1 @@ +../home/plom/.bash_profile \ No newline at end of file diff --git a/bookworm/copy/all/root/.bashrc b/bookworm/copy/all/root/.bashrc new file mode 120000 index 0000000..9ebea20 --- /dev/null +++ b/bookworm/copy/all/root/.bashrc @@ -0,0 +1 @@ +../home/plom/.bashrc \ No newline at end of file diff --git a/bookworm/copy/all/root/.local b/bookworm/copy/all/root/.local new file mode 120000 index 0000000..bad616a --- /dev/null +++ b/bookworm/copy/all/root/.local @@ -0,0 +1 @@ +../home/plom/.local \ No newline at end of file diff --git a/bookworm/copy/all/root/.plomlib b/bookworm/copy/all/root/.plomlib new file mode 120000 index 0000000..76e877f --- /dev/null +++ b/bookworm/copy/all/root/.plomlib @@ -0,0 +1 @@ +../home/plom/.plomlib \ No newline at end of file diff --git a/bookworm/copy/all/root/.profile b/bookworm/copy/all/root/.profile new file mode 120000 index 0000000..edcf39c --- /dev/null +++ b/bookworm/copy/all/root/.profile @@ -0,0 +1 @@ +../home/plom/.profile \ No newline at end of file diff --git a/bookworm/copy/all/root/.shell_prompt_color b/bookworm/copy/all/root/.shell_prompt_color new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/bookworm/copy/all/root/.shell_prompt_color @@ -0,0 +1 @@ +1 diff --git a/bookworm/copy/caddy/etc/caddy/Caddyfile b/bookworm/copy/caddy/etc/caddy/Caddyfile new file mode 100644 index 0000000..1eddd83 --- /dev/null +++ b/bookworm/copy/caddy/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/copy/catgirl/etc/systemd/system/catgirl.service b/bookworm/copy/catgirl/etc/systemd/system/catgirl.service new file mode 100644 index 0000000..38d9fd1 --- /dev/null +++ b/bookworm/copy/catgirl/etc/systemd/system/catgirl.service @@ -0,0 +1,15 @@ +[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/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.service b/bookworm/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.service new file mode 100644 index 0000000..3f22c84 --- /dev/null +++ b/bookworm/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.service @@ -0,0 +1,8 @@ +[Unit] +Description=Run script for encrypting catgirl logs. + +[Service] +Type=oneshot +User=plom +ExecStart=/bin/sh -cl 'encrypt_catgirl_logs' + diff --git a/bookworm/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.timer b/bookworm/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.timer new file mode 100644 index 0000000..c650376 --- /dev/null +++ b/bookworm/copy/catgirl/etc/systemd/system/encrypt_catgirl_logs.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run service for encrypting catgirl logs once every day. + +[Timer] +OnCalendar=*-*-* 01:00:00 + +[Install] +WantedBy=timers.target + diff --git a/bookworm/copy/catgirl/home/plom/.config/catgirl/libera b/bookworm/copy/catgirl/home/plom/.config/catgirl/libera new file mode 100644 index 0000000..f27baa7 --- /dev/null +++ b/bookworm/copy/catgirl/home/plom/.config/catgirl/libera @@ -0,0 +1,4 @@ +host = irc.libera.chat +join = #plomtest +sasl-plain = plomtest:REPLACE_WITH_IRC_PASSWORD +log diff --git a/bookworm/copy/catgirl/home/plom/.local/bin/encrypt_catgirl_logs b/bookworm/copy/catgirl/home/plom/.local/bin/encrypt_catgirl_logs new file mode 100755 index 0000000..e6da887 --- /dev/null +++ b/bookworm/copy/catgirl/home/plom/.local/bin/encrypt_catgirl_logs @@ -0,0 +1,36 @@ +#!/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/copy/catgirl/home/plom/.local/share/catgirl/KILL_ME b/bookworm/copy/catgirl/home/plom/.local/share/catgirl/KILL_ME new file mode 100644 index 0000000..e69de29 diff --git a/bookworm/copy/catgirl/home/plom/.plomlib/abort b/bookworm/copy/catgirl/home/plom/.plomlib/abort new file mode 120000 index 0000000..1fa89a1 --- /dev/null +++ b/bookworm/copy/catgirl/home/plom/.plomlib/abort @@ -0,0 +1 @@ +../../../../../scripts/lib/abort \ No newline at end of file diff --git a/bookworm/copy/catgirl/home/plom/.plomlib/constants_user b/bookworm/copy/catgirl/home/plom/.plomlib/constants_user new file mode 120000 index 0000000..6aa6571 --- /dev/null +++ b/bookworm/copy/catgirl/home/plom/.plomlib/constants_user @@ -0,0 +1 @@ +../../../../../scripts/lib/constants_user \ No newline at end of file diff --git a/bookworm/copy/catgirl/home/plom/.plomlib/encrypt_with.pub b/bookworm/copy/catgirl/home/plom/.plomlib/encrypt_with.pub new file mode 100644 index 0000000..ddd5ba1 --- /dev/null +++ b/bookworm/copy/catgirl/home/plom/.plomlib/encrypt_with.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAoMa288S7iHnw8lEaSQTTK8pSJwBEWCCyPJF7zewbXrgGoHHXAYD88AJFrULBivTk6HIVpx+Dc0fdhheXr3yl8XGo57l7XTVd1xz2USxaPXfWHEz5mAtJVM4MJ7MjQ5eNkCgrJaOWZ1SLnSS/+dF3KGYs1BK7piIKFk/5AKQmX+0R3STxNlLlEOWG03224409VNliMKFhbfjszPJyaKDFKt4tnG12YgEZ0Zx2LbAfJZzFdkxb2qzcdb09vRHOEZgtFPszohVETaBtocl3mEPHRjwXzhE6fz/jzMHc+JZDViQONobvgJ7weVU7dnv8zmiobFuyOEb4uyAE1yugvBypPQ== diff --git a/bookworm/copy/catgirl/home/plom/.plomlib/expect_n_args b/bookworm/copy/catgirl/home/plom/.plomlib/expect_n_args new file mode 120000 index 0000000..eddbca9 --- /dev/null +++ b/bookworm/copy/catgirl/home/plom/.plomlib/expect_n_args @@ -0,0 +1 @@ +../../../../../scripts/lib/expect_n_args \ No newline at end of file diff --git a/bookworm/copy/seedbox/etc/systemd/system/rtorrent.service b/bookworm/copy/seedbox/etc/systemd/system/rtorrent.service new file mode 100644 index 0000000..9b98821 --- /dev/null +++ b/bookworm/copy/seedbox/etc/systemd/system/rtorrent.service @@ -0,0 +1,17 @@ +[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/copy/seedbox/home/plom/downloads/KILL_ME b/bookworm/copy/seedbox/home/plom/downloads/KILL_ME new file mode 100644 index 0000000..e69de29 diff --git a/bookworm/copy/seedbox/home/plom/seedbox/KILL_ME b/bookworm/copy/seedbox/home/plom/seedbox/KILL_ME new file mode 100644 index 0000000..e69de29 diff --git a/bookworm/copy/server/etc/nftables.conf b/bookworm/copy/server/etc/nftables.conf new file mode 100755 index 0000000..96dad3e --- /dev/null +++ b/bookworm/copy/server/etc/nftables.conf @@ -0,0 +1,46 @@ +#!/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/copy/server/etc/ssh/sshd_config b/bookworm/copy/server/etc/ssh/sshd_config new file mode 100644 index 0000000..e952cb3 --- /dev/null +++ b/bookworm/copy/server/etc/ssh/sshd_config @@ -0,0 +1,123 @@ + +# 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/catgirl/.plomlib/constants_catgirl b/bookworm/home/catgirl/.plomlib/constants_catgirl deleted file mode 120000 index cc7e3bf..0000000 --- a/bookworm/home/catgirl/.plomlib/constants_catgirl +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/lib/constants_catgirl \ No newline at end of file diff --git a/bookworm/scripts/lib/constants_catgirl b/bookworm/scripts/lib/constants_catgirl deleted file mode 100644 index daa6b56..0000000 --- a/bookworm/scripts/lib/constants_catgirl +++ /dev/null @@ -1,4 +0,0 @@ -. lib/constants_user # PATH_USER_HOME - -PATH_USER_SHARE_CATGIRL="${PATH_USER_HOME}/.local/share/catgirl" - diff --git a/bookworm/scripts/lib/copy_dirtree b/bookworm/scripts/lib/copy_dirtree deleted file mode 100644 index 507e376..0000000 --- a/bookworm/scripts/lib/copy_dirtree +++ /dev/null @@ -1,31 +0,0 @@ -. lib/expect_n_args -. lib/mkdir_p_for_user - -copy_dirtree() { - expect_n_args 4 99 'OWNER_TO_ENFORCE (to ignore, use "-") SOURCE_ROOT TARGET_ROOT TAG...' $@ - _OWNER="$1" - _SOURCE_ROOT="$2" - _TARGET_ROOT="$3" - shift 3 - _TAGS="$@" - for _TAG in ${_TAGS}; do - _PATH_TAG="${_SOURCE_ROOT}/${_TAG}" - if [ ! -d "${_PATH_TAG}" ]; then - continue - fi - cd "${_PATH_TAG}" - for _PATH_REL in $(find . -type f,l); do - _PATH_TARGET="${_TARGET_ROOT}"$(echo "${_PATH_REL}" | cut -c 2-) - _PATH_SOURCE=$(realpath "${_PATH_REL}") - _DIRECTORY=$(dirname "${_PATH_TARGET}") - if [ ! "${_OWNER}" = '-' ]; then - mkdir_p_for_user "${_OWNER}" "${_DIRECTORY}" - fi - cp -av "${_PATH_SOURCE}" "${_PATH_TARGET}" - if [ ! "${_OWNER}" = '-' ]; then - chown "${_OWNER}:${_OWNER}" "${_PATH_TARGET}" - fi - done - cd - > /dev/null - done -} diff --git a/bookworm/scripts/lib/copy_dirtrees_of_tags b/bookworm/scripts/lib/copy_dirtrees_of_tags new file mode 100644 index 0000000..22f2194 --- /dev/null +++ b/bookworm/scripts/lib/copy_dirtrees_of_tags @@ -0,0 +1,57 @@ +copy_dirtrees() { + _TAGS="$@" + _PATHS_WRITTEN= + for _TAG in ${_TAGS}; do + + _PATH_TAG="../copy/${_TAG}" + if [ ! -d "${_PATH_TAG}" ]; then + continue + fi + cd "${_PATH_TAG}" + for _PATH_REL in $(find . -type f,l); do + _PATH_TARGET="/$(echo ${_PATH_REL} | cut -c 2-)" + _DIRECTORY=$(dirname "${_PATH_TARGET}") + + # ensure directory by mkdir -p; to avoid later chowning pre-existing directories, + # collect only what's returned by the command as actually newly created + _CREATION_SUMMARY=$(mkdir -pv "${_DIRECTORY}") + _CREATED_PATHS=(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g") | sed -E "s/\$mkdir: created directory '//g" + _PATHS_WRITTEN="${_CREATED_PATHS}${_PATHS_WRITTEN}" + + # handle dirtree creation instruction files + _FILENAME="$(basename ${_PATH_REL})" + if [ "${_FILENAME}" = 'KILL_ME' ]; then # only there to ensure directory + continue + fi + _IS_LINK_ME=$(echo "${_FILENAME}" | grep -E '^LINK_ME') + if [ ! -z "${_IS_LINK_ME}" ]; then + _LINK_TARGET=$(cat "${_PATH_REL}" | head -1) + _LINK_NAME=$(cat "${_PATH_REL}" | tail -1) + if [ -z "${_LINK_NAME}" ]; then + _LINK_NAME=$(basename "${_LINK_TARGET}") + fi + _PATH_LINK="${_DIRECTORY}${_LINK_NAME}" + ln -s "${_LINK_TARGET}" "${_PATH_LINK}" + _PATHS_WRITTEN="${_PATH_LINK}\n${_PATHS_WRITTEN}" + continue + fi + + # actual file copying + _PATH_SOURCE=$(realpath "${_PATH_REL}") + _CREATION_SUMMARY=$(cp -av "${_PATH_SOURCE}" "${_PATH_TARGET}") + _CREATED_PATHS=(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g") | sed "s/.*' -> '//g") + _PATHS_WRITTEN="${_CREATED_PATHS}${_PATHS_WRITTEN}" + done + cd - > /dev/null + done + + # for all paths written into user home directories, chown to respective users + for _PATH in ${_PATHS_WRITTEN}; do + _IS_FOR_USER=$(echo "${_PATH}" | grep -E '^/home/") + if [ -z "${_IS_FOR_USER}" ]; then + continue + fi + _USERNAME=$(echo "${_PATH}" | sed -E '/^\/home\///' | sed -E '/\/.*//i') + chown -R "${_USERNAME}:${_USERNAME}" "${_PATH}" + do +} diff --git a/bookworm/scripts/lib/ensure_etc_of_tags b/bookworm/scripts/lib/ensure_etc_of_tags deleted file mode 100644 index 9d590a8..0000000 --- a/bookworm/scripts/lib/ensure_etc_of_tags +++ /dev/null @@ -1,8 +0,0 @@ -. lib/copy_dirtree -. lib/constants_etc # PATH_ETC, PATH_REL_ETC -. lib/constants_repopaths # PATH_CONF - -ensure_etc_of_tags() { - _PATH_CONF_ETC="${PATH_CONF}/${PATH_REL_ETC}" - copy_dirtree '-' "${_PATH_CONF_ETC}" "${PATH_ETC}" $@ -} diff --git a/bookworm/scripts/lib/ensure_homefiles_of_tags b/bookworm/scripts/lib/ensure_homefiles_of_tags deleted file mode 100644 index 4726fed..0000000 --- a/bookworm/scripts/lib/ensure_homefiles_of_tags +++ /dev/null @@ -1,6 +0,0 @@ -. lib/constants_user # PATH_USER_HOME, USERNAME -. lib/constants_repopaths # PATH_CONF_HOME - -ensure_homefiles_of_tags() { - copy_dirtree "${USERNAME}" "${PATH_CONF_HOME}" "${PATH_USER_HOME}" $@ -} diff --git a/bookworm/scripts/lib/mkdir_p_for_user b/bookworm/scripts/lib/mkdir_p_for_user deleted file mode 100644 index ad0e4a9..0000000 --- a/bookworm/scripts/lib/mkdir_p_for_user +++ /dev/null @@ -1,10 +0,0 @@ -mkdir_p_for_user() { - _USER="$1" - _TO_SHORTEN=$(mkdir -pv "$2" | sed "s/mkdir: created directory '//g" | head -1) - if [ ! -z "${_TO_SHORTEN}" ]; then - _LENGTH=$(echo -n "${_TO_SHORTEN}" | wc -c) - _TARGET_LENGTH=$(calc "${_LENGTH} - 1" | cut -f2) - _TARGET_DIR=$(echo "${_TO_SHORTEN}" | cut -c "-${_TARGET_LENGTH}") - chown -R "${_USER}:${_USER}" "${_TARGET_DIR}" - fi -} diff --git a/bookworm/scripts/lib/setup_user b/bookworm/scripts/lib/setup_user new file mode 100644 index 0000000..0395c46 --- /dev/null +++ b/bookworm/scripts/lib/setup_user @@ -0,0 +1,7 @@ +. lib/constants_user # USERNAME + +setup_user() { + echo "\nSetting up user: ${USERNAME}" + adduser --disabled-password --gecos "" "${USERNAME}" + usermod -a -G sudo "${USERNAME}" +} diff --git a/bookworm/scripts/lib/setup_users b/bookworm/scripts/lib/setup_users deleted file mode 100644 index 94f86ff..0000000 --- a/bookworm/scripts/lib/setup_users +++ /dev/null @@ -1,24 +0,0 @@ -. lib/copy_dirtree -. lib/constants_repopaths # PATH_CONF_HOME -. lib/constants_user # PATH_USER_HOME, USERNAME -. lib/ensure_homefiles_of_tags -. lib/mkdir_p_for_user - -setup_users() { - _MIN_TAGS="$1" - _TAGS_USER="$2" - _PATH_USER_BIN="${PATH_USER_HOME}/.local/bin" - - echo "\nSetting up root user's home directory." - copy_dirtree 'root' "${PATH_CONF_HOME}" '/root' ${_MIN_TAGS} root - - echo "\nSetting up user ${USERNAME}." - adduser --disabled-password --gecos "" "${USERNAME}" - usermod -a -G sudo "${USERNAME}" - ensure_homefiles_of_tags ${_MIN_TAGS} ${_TAGS_USER} - mkdir_p_for_user "${USERNAME}" "${_PATH_USER_BIN}" - cd "${_PATH_USER_BIN}" - ln -s ../../.plomlib lib - chown "${USERNAME}:${USERNAME}" lib - cd - > /dev/null -} diff --git a/bookworm/scripts/setup_catgirl.sh b/bookworm/scripts/setup_catgirl.sh index dd4b45d..53be07c 100755 --- a/bookworm/scripts/setup_catgirl.sh +++ b/bookworm/scripts/setup_catgirl.sh @@ -2,31 +2,24 @@ set -e cd $(dirname "$0") . lib/check_finished_marker -. lib/constants_catgirl # PATH_USER_SHARE_CATGIRL -. lib/constants_user # PATH_USER_HOME, USERNAME -. lib/ensure_etc_of_tags -. lib/ensure_homefiles_of_tags +. lib/constants_user # PATH_USER_HOME +. lib/copy_dirtrees_of_tags . lib/ensure_packages_of_tags . lib/expect_n_args -. lib/mkdir_p_for_user check_finished_marker 'setup_server' expect_n_args 1 1 'IRC_PASSWORD' $@ IRC_PASSWORD="$1" PATH_USER_CONF_CATGIRL="${PATH_USER_HOME}/.config/catgirl/libera" +INSTALL_TAGS=catgirl -echo "\nInstalling catgirl packages, /etc and /home files." -ensure_packages_of_tags catgirl -ensure_etc_of_tags catgirl -ensure_homefiles_of_tags catgirl - -echo "\nSetting up ${PATH_USER_SHARE_CATGIRL} so logs can go there." -mkdir_p_for_user "${USERNAME}" "${PATH_USER_SHARE_CATGIRL}" +echo "\nInstalling packages, /etc and /home files." +ensure_packages_of_tags ${INSTALL_TAGS} +copy_dirtrees_of_tags ${INSTALL_TAGS} echo "\nWriting provided password into ${PATH_USER_CONF_CATGIRL}." sed -i "s/REPLACE_WITH_IRC_PASSWORD/${IRC_PASSWORD}/g" "${PATH_USER_CONF_CATGIRL}" -chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_SHARE_CATGIRL}" echo "\nActivating catgirl tmux session service." systemctl enable --now catgirl diff --git a/bookworm/scripts/setup_seedbox.sh b/bookworm/scripts/setup_seedbox.sh new file mode 100644 index 0000000..66f4de5 --- /dev/null +++ b/bookworm/scripts/setup_seedbox.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e +cd $(dirname "$0") +. lib/check_finished_marker +. lib/ensure_packages_of_tags +. lib/copy_dirtrees_of_tags + +check_finished_marker 'setup_server' +INSTALL_TAGS=seedbox + +echo "\nInstalling packages, /etc and /home files." +ensure_packages_of_tags ${INSTALL_TAGS} +copy_dirtrees ${INSTALL_TAGS} + +echo "\nActivating service." +systemctl enable --now rtorrent diff --git a/bookworm/scripts/setup_server.sh b/bookworm/scripts/setup_server.sh index d2beae0..50a9ccd 100755 --- a/bookworm/scripts/setup_server.sh +++ b/bookworm/scripts/setup_server.sh @@ -3,15 +3,15 @@ set -e cd $(dirname "$0") . lib/constants_etc # PATH_ETC . lib/constants_ssh # PATH_REL_SSH, PATH_USER_SSH +. lib/copy_dirtrees_of_tags . lib/determine_ip -. lib/ensure_etc_of_tags . lib/expect_n_args . lib/init_packages . lib/path_tmp_timestamped . lib/put_finished_marker -. lib/setup_users +. lib/setup_user -MIN_TAGS='all server caddy' +INSTALL_TAGS='all server caddy' expect_n_args 3 3 'HOSTNAME, FQDN, WEB_PASSWORD' $@ HOSTNAME="$1" @@ -34,9 +34,9 @@ if [ "${RESULT}" != '0' ]; then cat "${PATH_CURL_ERROR}" exit 1 fi -curl -1Lf "${PATH_CADDY_REPO}/debian.deb.txt" > /etc/apt/sources.list.d/caddy-stable.list +curl -1LfsS "${PATH_CADDY_REPO}/debian.deb.txt" > /etc/apt/sources.list.d/caddy-stable.list -init_packages "${MIN_TAGS}" +init_packages "${INSTALL_TAGS}" echo '\nSetting hostname and FQDN.' echo "${HOSTNAME}" > "${PATH_ETC}/hostname" @@ -44,15 +44,13 @@ hostname "${HOSTNAME}" echo '127.0.0.1 localhost.localdomain localhost' > "${PATH_HOSTS}" echo "$(determine_ip) ${FQDN} ${HOSTNAME}" >> "${PATH_HOSTS}" -echo '\nAdapting /etc to our needs.' -ensure_etc_of_tags ${MIN_TAGS} +setup_user +echo '\nCopying over files, directories.' +copy_dirtrees_of_tags ${INSTALL_TAGS} -echo '\nSetting Berlin localtime.' -ln -sf /usr/share/zoneinfo/Europe/Berlin "${PATH_ETC}/localtime" +echo '\nSyncing clock.' ntpdate-debian -setup_users "${MIN_TAGS}" '' - echo '\nMoving SSH data from root to user.' mkdir -p "${PATH_USER_SSH}" mv "/root/${PATH_REL_SSH}/authorized_keys" "${PATH_USER_SSH}/" diff --git a/testing/etc/all/apt/apt.conf.d/99_minimize_dependencies b/testing/__etc/all/apt/apt.conf.d/99_minimize_dependencies similarity index 100% rename from testing/etc/all/apt/apt.conf.d/99_minimize_dependencies rename to testing/__etc/all/apt/apt.conf.d/99_minimize_dependencies diff --git a/testing/etc/all/apt/sources.list b/testing/__etc/all/apt/sources.list similarity index 100% rename from testing/etc/all/apt/sources.list rename to testing/__etc/all/apt/sources.list diff --git a/testing/etc/all/locale.conf b/testing/__etc/all/locale.conf similarity index 100% rename from testing/etc/all/locale.conf rename to testing/__etc/all/locale.conf diff --git a/testing/etc/all/locale.gen b/testing/__etc/all/locale.gen similarity index 100% rename from testing/etc/all/locale.gen rename to testing/__etc/all/locale.gen diff --git a/testing/etc/all/timezone b/testing/__etc/all/timezone similarity index 100% rename from testing/etc/all/timezone rename to testing/__etc/all/timezone diff --git a/testing/etc/desktop/network/interfaces b/testing/__etc/desktop/network/interfaces similarity index 100% rename from testing/etc/desktop/network/interfaces rename to testing/__etc/desktop/network/interfaces diff --git a/testing/home/all/.bash_profile b/testing/__home/all/.bash_profile similarity index 100% rename from testing/home/all/.bash_profile rename to testing/__home/all/.bash_profile diff --git a/testing/home/all/.bashrc b/testing/__home/all/.bashrc similarity index 100% rename from testing/home/all/.bashrc rename to testing/__home/all/.bashrc diff --git a/testing/home/all/.plomlib/file_dot_variants b/testing/__home/all/.plomlib/file_dot_variants similarity index 100% rename from testing/home/all/.plomlib/file_dot_variants rename to testing/__home/all/.plomlib/file_dot_variants diff --git a/testing/home/all/.profile b/testing/__home/all/.profile similarity index 100% rename from testing/home/all/.profile rename to testing/__home/all/.profile diff --git a/testing/home/desktop/.bashrc.desktop b/testing/__home/desktop/.bashrc.desktop similarity index 100% rename from testing/home/desktop/.bashrc.desktop rename to testing/__home/desktop/.bashrc.desktop diff --git a/testing/home/desktop/.config/sway/config b/testing/__home/desktop/.config/sway/config similarity index 100% rename from testing/home/desktop/.config/sway/config rename to testing/__home/desktop/.config/sway/config diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/__home/desktop/.local/bin/borgplom similarity index 100% rename from testing/home/desktop/.local/bin/borgplom rename to testing/__home/desktop/.local/bin/borgplom diff --git a/testing/home/desktop/.local/bin/make_secrets b/testing/__home/desktop/.local/bin/make_secrets similarity index 100% rename from testing/home/desktop/.local/bin/make_secrets rename to testing/__home/desktop/.local/bin/make_secrets diff --git a/testing/home/desktop/.local/bin/vol b/testing/__home/desktop/.local/bin/vol similarity index 100% rename from testing/home/desktop/.local/bin/vol rename to testing/__home/desktop/.local/bin/vol diff --git a/testing/home/desktop/.plomlib/abort b/testing/__home/desktop/.plomlib/abort similarity index 100% rename from testing/home/desktop/.plomlib/abort rename to testing/__home/desktop/.plomlib/abort diff --git a/testing/home/desktop/.plomlib/abort_if_exists b/testing/__home/desktop/.plomlib/abort_if_exists similarity index 100% rename from testing/home/desktop/.plomlib/abort_if_exists rename to testing/__home/desktop/.plomlib/abort_if_exists diff --git a/testing/home/desktop/.plomlib/audio_dev_is_mute b/testing/__home/desktop/.plomlib/audio_dev_is_mute similarity index 100% rename from testing/home/desktop/.plomlib/audio_dev_is_mute rename to testing/__home/desktop/.plomlib/audio_dev_is_mute diff --git a/testing/home/desktop/.plomlib/constants_borg b/testing/__home/desktop/.plomlib/constants_borg similarity index 100% rename from testing/home/desktop/.plomlib/constants_borg rename to testing/__home/desktop/.plomlib/constants_borg diff --git a/testing/home/desktop/.plomlib/constants_secrets b/testing/__home/desktop/.plomlib/constants_secrets similarity index 100% rename from testing/home/desktop/.plomlib/constants_secrets rename to testing/__home/desktop/.plomlib/constants_secrets diff --git a/testing/home/desktop/.plomlib/constants_ssh b/testing/__home/desktop/.plomlib/constants_ssh similarity index 100% rename from testing/home/desktop/.plomlib/constants_ssh rename to testing/__home/desktop/.plomlib/constants_ssh diff --git a/testing/home/desktop/.plomlib/constants_user b/testing/__home/desktop/.plomlib/constants_user similarity index 100% rename from testing/home/desktop/.plomlib/constants_user rename to testing/__home/desktop/.plomlib/constants_user diff --git a/testing/home/desktop/.plomlib/expect_min_n_args b/testing/__home/desktop/.plomlib/expect_min_n_args similarity index 100% rename from testing/home/desktop/.plomlib/expect_min_n_args rename to testing/__home/desktop/.plomlib/expect_min_n_args diff --git a/testing/home/desktop/.plomlib/expect_n_args b/testing/__home/desktop/.plomlib/expect_n_args similarity index 100% rename from testing/home/desktop/.plomlib/expect_n_args rename to testing/__home/desktop/.plomlib/expect_n_args diff --git a/testing/home/desktop/.plomlib/get_passphrase b/testing/__home/desktop/.plomlib/get_passphrase similarity index 100% rename from testing/home/desktop/.plomlib/get_passphrase rename to testing/__home/desktop/.plomlib/get_passphrase diff --git a/testing/home/desktop/.plomlib/mount_secrets b/testing/__home/desktop/.plomlib/mount_secrets similarity index 100% rename from testing/home/desktop/.plomlib/mount_secrets rename to testing/__home/desktop/.plomlib/mount_secrets diff --git a/testing/home/desktop/.plomlib/path_tmp_timestamped b/testing/__home/desktop/.plomlib/path_tmp_timestamped similarity index 100% rename from testing/home/desktop/.plomlib/path_tmp_timestamped rename to testing/__home/desktop/.plomlib/path_tmp_timestamped diff --git a/testing/home/desktop/.plomlib/print_usage b/testing/__home/desktop/.plomlib/print_usage similarity index 100% rename from testing/home/desktop/.plomlib/print_usage rename to testing/__home/desktop/.plomlib/print_usage diff --git a/testing/home/desktop/.plomlib/retry_until b/testing/__home/desktop/.plomlib/retry_until similarity index 100% rename from testing/home/desktop/.plomlib/retry_until rename to testing/__home/desktop/.plomlib/retry_until diff --git a/testing/home/desktop/.profile.desktop b/testing/__home/desktop/.profile.desktop similarity index 100% rename from testing/home/desktop/.profile.desktop rename to testing/__home/desktop/.profile.desktop diff --git a/testing/home/desktop/.tridactylrc b/testing/__home/desktop/.tridactylrc similarity index 100% rename from testing/home/desktop/.tridactylrc rename to testing/__home/desktop/.tridactylrc diff --git a/testing/home/root/.shell_prompt_color b/testing/__home/root/.shell_prompt_color similarity index 100% rename from testing/home/root/.shell_prompt_color rename to testing/__home/root/.shell_prompt_color diff --git a/testing/home/t490s/.nonpath_bins/status.sh b/testing/__home/t490s/.nonpath_bins/status.sh similarity index 100% rename from testing/home/t490s/.nonpath_bins/status.sh rename to testing/__home/t490s/.nonpath_bins/status.sh diff --git a/testing/home/user/.gitconfig b/testing/__home/user/.gitconfig similarity index 100% rename from testing/home/user/.gitconfig rename to testing/__home/user/.gitconfig diff --git a/testing/home/user/.shell_prompt_color b/testing/__home/user/.shell_prompt_color similarity index 100% rename from testing/home/user/.shell_prompt_color rename to testing/__home/user/.shell_prompt_color 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/sources.list b/testing/copy/all/etc/apt/sources.list new file mode 100644 index 0000000..9671eed --- /dev/null +++ b/testing/copy/all/etc/apt/sources.list @@ -0,0 +1,2 @@ +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/copy/all/etc/locale.conf b/testing/copy/all/etc/locale.conf new file mode 100644 index 0000000..dd6eee3 --- /dev/null +++ b/testing/copy/all/etc/locale.conf @@ -0,0 +1 @@ +LANG="en_US.UTF-8" diff --git a/testing/copy/all/etc/locale.gen b/testing/copy/all/etc/locale.gen new file mode 100644 index 0000000..a28cfa4 --- /dev/null +++ b/testing/copy/all/etc/locale.gen @@ -0,0 +1,483 @@ +# 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/copy/all/etc/timezone b/testing/copy/all/etc/timezone new file mode 100644 index 0000000..94d5acc --- /dev/null +++ b/testing/copy/all/etc/timezone @@ -0,0 +1 @@ +Europe/Berlin 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/desktop/etc/network/interfaces b/testing/copy/desktop/etc/network/interfaces new file mode 100644 index 0000000..303ee92 --- /dev/null +++ b/testing/copy/desktop/etc/network/interfaces @@ -0,0 +1,10 @@ +# 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/copy/desktop/home/plom/.bashrc.desktop b/testing/copy/desktop/home/plom/.bashrc.desktop new file mode 100644 index 0000000..baa8d8b --- /dev/null +++ b/testing/copy/desktop/home/plom/.bashrc.desktop @@ -0,0 +1,4 @@ +# 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/copy/desktop/home/plom/.config/sway/config b/testing/copy/desktop/home/plom/.config/sway/config new file mode 100644 index 0000000..f8c16e2 --- /dev/null +++ b/testing/copy/desktop/home/plom/.config/sway/config @@ -0,0 +1,91 @@ +# 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/copy/desktop/home/plom/.local/bin/borgplom b/testing/copy/desktop/home/plom/.local/bin/borgplom new file mode 100755 index 0000000..e3db0cca --- /dev/null +++ b/testing/copy/desktop/home/plom/.local/bin/borgplom @@ -0,0 +1,221 @@ +#!/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/copy/desktop/home/plom/.local/bin/make_secrets b/testing/copy/desktop/home/plom/.local/bin/make_secrets new file mode 100755 index 0000000..344214e --- /dev/null +++ b/testing/copy/desktop/home/plom/.local/bin/make_secrets @@ -0,0 +1,28 @@ +#!/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/copy/desktop/home/plom/.local/bin/vol b/testing/copy/desktop/home/plom/.local/bin/vol new file mode 100755 index 0000000..e77a243 --- /dev/null +++ b/testing/copy/desktop/home/plom/.local/bin/vol @@ -0,0 +1,56 @@ +#!/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/copy/desktop/home/plom/.plomlib/abort b/testing/copy/desktop/home/plom/.plomlib/abort new file mode 120000 index 0000000..1fa89a1 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/abort @@ -0,0 +1 @@ +../../../../../scripts/lib/abort \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/abort_if_exists b/testing/copy/desktop/home/plom/.plomlib/abort_if_exists new file mode 120000 index 0000000..2c89f91 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/abort_if_exists @@ -0,0 +1 @@ +../../../../../scripts/lib/abort_if_exists \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/audio_dev_is_mute b/testing/copy/desktop/home/plom/.plomlib/audio_dev_is_mute new file mode 100644 index 0000000..e28da40 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/audio_dev_is_mute @@ -0,0 +1,3 @@ +audio_dev_is_mute() { + [ "$(pactl get-sink-mute 0)" = "Mute: yes" ] +} diff --git a/testing/copy/desktop/home/plom/.plomlib/constants_borg b/testing/copy/desktop/home/plom/.plomlib/constants_borg new file mode 120000 index 0000000..11fd28a --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/constants_borg @@ -0,0 +1 @@ +../../../../../scripts/lib/constants_borg \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/constants_secrets b/testing/copy/desktop/home/plom/.plomlib/constants_secrets new file mode 120000 index 0000000..c44c50b --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/constants_secrets @@ -0,0 +1 @@ +../../../../../scripts/lib/constants_secrets \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/constants_ssh b/testing/copy/desktop/home/plom/.plomlib/constants_ssh new file mode 120000 index 0000000..edc00a7 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/constants_ssh @@ -0,0 +1 @@ +../../../../../scripts/lib/constants_ssh \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/constants_user b/testing/copy/desktop/home/plom/.plomlib/constants_user new file mode 120000 index 0000000..6aa6571 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/constants_user @@ -0,0 +1 @@ +../../../../../scripts/lib/constants_user \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/expect_min_n_args b/testing/copy/desktop/home/plom/.plomlib/expect_min_n_args new file mode 120000 index 0000000..e38a6d1 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/expect_min_n_args @@ -0,0 +1 @@ +../../../../../scripts/lib/expect_min_n_args \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/expect_n_args b/testing/copy/desktop/home/plom/.plomlib/expect_n_args new file mode 120000 index 0000000..eddbca9 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/expect_n_args @@ -0,0 +1 @@ +../../../../../scripts/lib/expect_n_args \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/get_passphrase b/testing/copy/desktop/home/plom/.plomlib/get_passphrase new file mode 120000 index 0000000..e7d3829 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/get_passphrase @@ -0,0 +1 @@ +../../../../../scripts/lib/get_passphrase \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/mount_secrets b/testing/copy/desktop/home/plom/.plomlib/mount_secrets new file mode 120000 index 0000000..62637a7 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/mount_secrets @@ -0,0 +1 @@ +../../../../../scripts/lib/mount_secrets \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/path_tmp_timestamped b/testing/copy/desktop/home/plom/.plomlib/path_tmp_timestamped new file mode 120000 index 0000000..85c7c4b --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/path_tmp_timestamped @@ -0,0 +1 @@ +../../../../../scripts/lib/path_tmp_timestamped \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.plomlib/print_usage b/testing/copy/desktop/home/plom/.plomlib/print_usage new file mode 100644 index 0000000..b1d6204 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/print_usage @@ -0,0 +1,37 @@ +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/copy/desktop/home/plom/.plomlib/retry_until b/testing/copy/desktop/home/plom/.plomlib/retry_until new file mode 120000 index 0000000..5fa5898 --- /dev/null +++ b/testing/copy/desktop/home/plom/.plomlib/retry_until @@ -0,0 +1 @@ +../../../../../scripts/lib/retry_until \ No newline at end of file diff --git a/testing/copy/desktop/home/plom/.profile.desktop b/testing/copy/desktop/home/plom/.profile.desktop new file mode 100644 index 0000000..57a42bd --- /dev/null +++ b/testing/copy/desktop/home/plom/.profile.desktop @@ -0,0 +1,6 @@ +# 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/copy/desktop/home/plom/.tridactylrc b/testing/copy/desktop/home/plom/.tridactylrc new file mode 100644 index 0000000..d13f9fb --- /dev/null +++ b/testing/copy/desktop/home/plom/.tridactylrc @@ -0,0 +1,17 @@ +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/copy/t490s/home/plom/.nonpath_bins/status.sh b/testing/copy/t490s/home/plom/.nonpath_bins/status.sh new file mode 100755 index 0000000..2de1358 --- /dev/null +++ b/testing/copy/t490s/home/plom/.nonpath_bins/status.sh @@ -0,0 +1,175 @@ +#!/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/copy/user/home/plom/.gitconfig b/testing/copy/user/home/plom/.gitconfig new file mode 100644 index 0000000..8967d25 --- /dev/null +++ b/testing/copy/user/home/plom/.gitconfig @@ -0,0 +1,3 @@ +[user] + email = c.heller@plomlompom.de + name = Christian Heller diff --git a/testing/copy/user/home/plom/.shell_prompt_color b/testing/copy/user/home/plom/.shell_prompt_color new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/testing/copy/user/home/plom/.shell_prompt_color @@ -0,0 +1 @@ +2 diff --git a/testing/scripts/lib/copy_dirtree b/testing/scripts/lib/copy_dirtree deleted file mode 120000 index 632d725..0000000 --- a/testing/scripts/lib/copy_dirtree +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/scripts/lib/copy_dirtree \ No newline at end of file diff --git a/testing/scripts/lib/ensure_etc_of_tags b/testing/scripts/lib/ensure_etc_of_tags deleted file mode 120000 index 49a4429..0000000 --- a/testing/scripts/lib/ensure_etc_of_tags +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/scripts/lib/ensure_etc_of_tags \ No newline at end of file diff --git a/testing/scripts/lib/ensure_homefiles_of_tags b/testing/scripts/lib/ensure_homefiles_of_tags deleted file mode 120000 index 218fee3..0000000 --- a/testing/scripts/lib/ensure_homefiles_of_tags +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/scripts/lib/ensure_homefiles_of_tags \ No newline at end of file diff --git a/testing/scripts/lib/mkdir_p_for_user b/testing/scripts/lib/mkdir_p_for_user deleted file mode 120000 index 57cee0e..0000000 --- a/testing/scripts/lib/mkdir_p_for_user +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/scripts/lib/mkdir_p_for_user \ No newline at end of file diff --git a/testing/scripts/lib/setup_user b/testing/scripts/lib/setup_user new file mode 120000 index 0000000..66571a2 --- /dev/null +++ b/testing/scripts/lib/setup_user @@ -0,0 +1 @@ +../../../bookworm/scripts/lib/setup_user \ No newline at end of file diff --git a/testing/scripts/lib/setup_users b/testing/scripts/lib/setup_users deleted file mode 120000 index 53fa9d0..0000000 --- a/testing/scripts/lib/setup_users +++ /dev/null @@ -1 +0,0 @@ -../../../bookworm/scripts/lib/setup_users \ No newline at end of file diff --git a/testing/scripts/setup_desktop.sh b/testing/scripts/setup_desktop.sh index ea3895d..6108786 100755 --- a/testing/scripts/setup_desktop.sh +++ b/testing/scripts/setup_desktop.sh @@ -3,17 +3,15 @@ set -e cd $(dirname "$0") . lib/abort . lib/abort_if_offline -. lib/constants_etc # PATH_REL_ETC, PATH_ETC, PATH_REL_ETC -. lib/constants_repopaths # PATH_CONF +. lib/constants_etc # PATH_ETC, PATH_REL_ETC . lib/constants_user # USERNAME . lib/determine_ip -. lib/ensure_etc_of_tags . lib/expect_min_n_args . lib/init_packages . lib/put_finished_marker -. lib/setup_users +. lib/setup_user -PATH_CONF_ETC="${PATH_CONF}/${PATH_REL_ETC}" +PATH_CONF_ETC="../${PATH_REL_ETC}" PATH_NETWORK_INTERFACES="${PATH_ETC}/network/interfaces" PATH_REL_APT=apt PATH_REL_APT_CONF=${PATH_REL_APT}/apt.conf.d @@ -101,17 +99,17 @@ hostname "${SYSTEM_NAME}" echo "127.0.0.1 localhost.localdomain localhost" > /etc/hosts echo "$(determine_ip) ${SYSTEM_NAME}" >> /etc/hosts -echo "\nAdapting /etc to our needs." -ensure_etc_of_tags ${TAGS_PACKAGES} +setup_user +echo '\nCopying over files, directories.' +copy_dirtrees_of_tags ${INSTALL_TAGS} echo "\nEnsuring our desired locale is available." locale-gen -echo "\nSetting Berlin localtime." -ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime +echo '\nSyncing clock.' ntpdate-debian -setup_users "${MIN_TAGS}" "${TAGS_USER}" +echo '\nFinal user setup.' adduser plom plugdev # so user may use pmount passwd "${USERNAME}" -- 2.30.2