From 01cfb456e07e452482572fd92fd11e8ea550c0c0 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Sun, 8 May 2022 13:26:09 -0500 Subject: [PATCH] Initial Commit --- Containerfile | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 22 ++++++++++++++++ tmux.conf | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 Containerfile create mode 100644 README.md create mode 100644 tmux.conf diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..8257391 --- /dev/null +++ b/Containerfile @@ -0,0 +1,68 @@ + +FROM docker.io/archlinux/archlinux:latest + +#### +# Init + +# Add tl-repo.conf to the filesystem +ADD tl-repo.conf /etc/pacman.d/tl-repo.conf + +# Add the tl repo to the pacman config +RUN printf "\nInclude = /etc/pacman.d/tl-repo.conf" >> /etc/pacman.conf + +# Initialize pacman keyring +RUN pacman-key --init + +# Update pacman sync databases +RUN pacman -Sy --noconfirm + +# Update archlinux-keyring first +RUN pacman -S --needed --noconfirm archlinux-keyring + +# Update packages +RUN pacman -Su --noconfirm + + +#### +# Package Install + +# Installing top-level packages +RUN pacman -S --noconfirm \ + weechat \ + tmux \ + mosh \ + zerotier-one \ + +# Installing optional deps +RUN pacman -S --needed --asdeps --noconfirm \ + aspell-en \ + lua \ + pearl \ + python \ + ruby \ + tcl \ + + +#### +# Setup + +# Create user +RUN useradd -m -s /bin/bash thurstylark + +# Configure sshd +ADD sshd_config /etc/ssh/ + +# Configure tmux +ADD tmux.conf /home/thurstylark/.tmux.conf + +# zerotier-one identity and config +VOLUME /var/lib/zerotier-one/ + +# weechat config +VOLUME /home/thurstylark/.config/weechat/ + +# Startup script +ADD startup.bash /usr/bin/startup.bash + +# Execute startup +CMD ["/usr/bin/bash", "/usr/bin/startup.bash"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..1c4bf64 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Files + +- `tmux.conf`: Tmux configuration +- `startup.bash`: Startup script +- `sshd_config`: sshd config for host + + +# Volumes + +These directories should be volumes to persistent storage + +- `/var/lib/zerotier-one`: ZeroTier identity and config information +- `/home/thurstylark/.config/weechat`: Weechat config + + +# Secrets + +These Secrets should be set up on first start for the init to work properly + +- tl-weechat-ztnetaddr +- tl-weechat-pass +- tl-weechat-authorizedkeys diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..d7806f5 --- /dev/null +++ b/tmux.conf @@ -0,0 +1,70 @@ +#### +# tl-weemux +# Thurstylark's weechat+tmux setup +# +# tmux.conf + + + +#### +# Keep the session even if no clients are attached +# +# NOTE: CRITICALLY NECESSARY +set -g destroy-unattached off + + + +#### +# Set terminfo +set -g default-terminal "tmux-256color" + + + +#### +# Set base pane and window index to 1 +set -g base-index 1 +set -g pane-base-index 1 + + +#### +# Disable status bar +set -g status off + + +#### +# Change prefix to C-a +set -g prefix C-a + + +#### +# Use C-a,a to send prefix to nested session +bind-key a send-prefix + + +#### +# Set audible bell on, and visual bell off because it is slooooowwwww +set -g bell-action any +set -g visual-bell off +set -g visual-silence off +set -g visual-activity off + + +#### +# No delay for escape key press +set -sg escape-time 0 + + +#### +# Use Alt-arrow keys without prefix key to switch panes +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + + +#### +# Do the same for HJKL +bind -n M-h select-pane -L +bind -n M-l select-pane -R +bind -n M-k select-pane -U +bind -n M-j select-pane -D