Compare commits

...

3 Commits

Author SHA1 Message Date
13b1fd9ba9 update confs and add vpn package 2025-08-06 11:41:29 +01:00
fed0835ad7 remove cachyos and paru packages 2025-08-04 00:50:40 +01:00
7ebccf3057 add packages 2025-08-02 01:34:12 +01:00
6 changed files with 252 additions and 2 deletions

4
cachyos Normal file
View File

@ -0,0 +1,4 @@
cachyos-keyring
cachyos-mirrorlist
cachyos-v3-mirrorlist
cachyos-v4-mirrorlist

View File

@ -27,7 +27,7 @@ monitor = ,highrr,auto,1
# Set programs that you use
$terminal = kitty
$fileManager = dolphin
$menu = fuzzel
$menu = tofi-drun --drun-launch=true -c /home/fergus/.config/tofi.conf
#################

94
packages Normal file
View File

@ -0,0 +1,94 @@
base
base-devel
bash
bat
btop
coreutils
curl
discord
docker
docker-buildx
docker-compose
efibootmgr
efitools
elixir
erlang
exfat-utils
eza
fastfetch
fd
firefox
fzf
gdm
git
go
golangci-lint
gopls
hip-runtime-amd
hipblas
hipblas-common
hsa-rocr
hyprcursor
hypridle
hyprland
hyprlock
hyprshot
inotify-tools
intel-ucode
jq
just
kitty
linux-firmware
linux
lld
lua
lua-language-server
luajit
neovim
nodejs
noto-fonts
noto-fonts-emoji
noto-fonts-extra
npm
nvtop
pipewire
python
rdma-core
ripgrep
rocblas
rocm-core
rocm-device-libs
rocm-llvm
rocminfo
rocprim
rocprofiler-register
rocsolver
rocsparse
roctracer
rtkit
rustup
sbctl
starship
stow
stylua
sudo
swaync
tmux
ttf-jetbrains-mono-nerd
ttf-liberation
ttf-noto-nerd
ufw
unzip
uwsm
watchexec
waybar
wayland
wget
wireguard-tools
wireplumber
wl-clipboard
xdg-desktop-portal
xdg-user-dirs
zsh
zsh-autosuggestions
zstd

33
vpn/PKGBUILD Normal file
View File

@ -0,0 +1,33 @@
# Maintainer: Your Name <fergus@molloy.xyz>
pkgname=vpn
pkgver=1.0.0
pkgrel=1
epoch=
pkgdesc="Bash script to manage wireguard vpn connections"
arch=(any)
url=""
license=('Unlicense')
groups=()
depends=(wireguard-tools)
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("vpn")
noextract=("vpn")
sha256sums=(
4049e2b082f88a06ef0890498f556018d07939d5f2fb54a9d409fbeb8023be47
)
validpgpkeys=()
package() {
mkdir -p "$pkgdir"
install -D -m 755 vpn "${pkgdir}/usr/bin/vpn"
}

119
vpn/vpn Executable file
View File

@ -0,0 +1,119 @@
#!/usr/bin/env bash
# check user is root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Initialize variables
ACTION=""
VPN_NAME=""
DEFAULT_VPN="p-sweden"
# Function to display usage
usage() {
echo "Usage: $0 [COMMAND] [VPN_NAME]"
echo "Commands:"
echo " (no args) Get VPN status"
echo " list List available VPN connections"
echo " down Disconnect from VPN"
echo " up Connect to default VPN"
echo " up <name> Connect to specific VPN"
exit 1
}
# Parse command line arguments
case $# in
0)
# No arguments - get status
ACTION="status"
;;
1)
case $1 in
"list")
ACTION="list"
;;
"down")
ACTION="down"
;;
"up")
ACTION="up"
VPN_NAME="$DEFAULT_VPN"
;;
"help"|"-h"|"--help")
usage
;;
*)
echo "Error: Unknown command '$1'"
usage
;;
esac
;;
2)
case $1 in
"up")
ACTION="up"
VPN_NAME="$2"
;;
*)
echo "Error: Command '$1' does not accept additional arguments"
usage
;;
esac
;;
*)
echo "Error: Too many arguments"
usage
;;
esac
down() {
CURRENT_CONNECTION="$(wg | grep interface | sed 's/.*: //')"
if [ ! -z $CURRENT_CONNECTION ]; then
wg-quick down $CURRENT_CONNECTION
printf "\n\x1b[1;31mDisconnected from $CURRENT_CONNECTION\x1b[0m\n"
else
echo "Not connected"
fi
}
up() {
down
FOUND_CONFIGS=$(fd -tf "$VPN_NAME" -e "conf" --format '{/.}' /etc/wireguard)
POSSIBLE_CONFIG_COUNTS=$(echo $FOUND_CONFIGS | wc -l)
if [ $POSSIBLE_CONFIG_COUNTS -eq 0 ]; then
echo "No configuration found for $VPN_NAME"
exit 1
fi
if [ $POSSIBLE_CONFIG_COUNTS -gt 1 ]; then
echo "Mulitple configurations found for $VPN_NAME:"
echo $FOUND_CONFIGS
exit 1
fi
printf "\n\x1b[1;32mConnecting to $FOUND_CONFIGS\x1b[0m\n\n"
wg-quick up $FOUND_CONFIGS
}
# Example of how to use the variables
case $ACTION in
"status")
wg
;;
"list")
echo "Possible connections:"
fd . -tf -e "conf" --format '{/.}' /etc/wireguard
;;
"down")
down
;;
"up")
up
;;
esac

View File

@ -86,7 +86,7 @@ total %*E
# add common bin dirs to path
export PATH="/home/fergus/.local/bin:$PATH"
export PATH="/home/fergus/.local/bin:/home/fergus/.cargo/bin:$PATH"
export PATH="/home/fergus/.cargo/bin:$PATH"
export PATH="/home/fergus/go/bin/:$PATH"
# import any extra env that doesn't want to be kept in vsc