From 65df2c92acc536a15256f4c01799b83664f3896d Mon Sep 17 00:00:00 2001 From: manhunter Date: Wed, 2 Sep 2026 23:33:20 -0400 Subject: [PATCH] arch gitea config --- .config/fish/mm.config.fish | 19 ++++++++++++++++++ scripts/arch/server-gitea.sh | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .config/fish/mm.config.fish create mode 100644 scripts/arch/server-gitea.sh diff --git a/.config/fish/mm.config.fish b/.config/fish/mm.config.fish new file mode 100644 index 0000000..e7be1c7 --- /dev/null +++ b/.config/fish/mm.config.fish @@ -0,0 +1,19 @@ +# do not load default ranger config +set RANGER_LOAD_DEFAULT_RC FALSE + +# source aliases +if test -f ~/.config/fish/.alias + source ~/.config/fish/.alias +end + +# overwrite greeting +# potentially disabling fastfetch +function fish_greeting + # smth smth + if set -q TMUX + fastfetch --logo small + else + fastfetch + end +end + diff --git a/scripts/arch/server-gitea.sh b/scripts/arch/server-gitea.sh new file mode 100644 index 0000000..44baf1e --- /dev/null +++ b/scripts/arch/server-gitea.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# ============================================================================== +# Auth: alex +# File: server-gitea.sh +# Revn: 09-02-2026 0.0.1 +# Func: configure gitea as much as possible automatically +# +# TODO: write +# comment +# test +# ============================================================================== +# CHANGE LOG +# ------------------------------------------------------------------------------ +# 09-02-2026: init +# +# ============================================================================== + +# assumed to run as sudo + +server-gitea() { + + # initialize port arg with default port + PORT=3000 + # if arg was given + if [[ $# -gt 0 ]]; then + PORT=$1 # change port + # change service file to include new port + sed -i -e "s/web/web -p $PORT/" /usr/lib/systemd/system/gitea.service + systemctl daemon-reload # reload systemctl with new port + fi + + systemctl start gitea # start gitea + # get status and store logs + systemctl status gitea >> dotfiles/scripts/arch/server-gitea.log + + # let gitea through firewall + ufw allow in on wlan0 from any to any port $PORT +} +