systemconfig

This commit is contained in:
Wryn (yage) Wagner 2024-08-13 12:46:20 -06:00
parent bfcc3d0495
commit 31c50177f5
3 changed files with 47 additions and 5 deletions

View File

@ -6,7 +6,9 @@ function SETUP__CONFIG() {
CONFIG__ZSH || return 2 CONFIG__ZSH || return 2
CONFIG__VIM || return 3 CONFIG__VIM || return 3
SCWRYPTS generate i3 config || return 4 CONFIG__SYSTEM || return 4
SCWRYPTS generate i3 config || return 5
SUCCESS 'finished application configuration' SUCCESS 'finished application configuration'
} }
@ -14,8 +16,8 @@ function SETUP__CONFIG() {
##################################################################### #####################################################################
CONFIG__ZSH() { CONFIG__ZSH() {
CONFIG__ENV zsh || return 1 #CONFIG__ENV zsh || return 1
CONFIG__RC zsh || return 2 #CONFIG__RC zsh || return 2
CONFIG__SET_DEFAULT_SHELL || return 3 CONFIG__SET_DEFAULT_SHELL || return 3
} }
@ -43,6 +45,46 @@ CONFIG__VIM() {
##################################################################### #####################################################################
CONFIG__SYSTEM() {
STATUS "configuring system applications"
local \
SYSTEM_APPLICATION \
SOURCE_DIR SOURCE_CONFIG \
SYSTEM_DIR SYSTEM_CONFIG \
;
for SOURCE_DIR in $(find "$DOTWRYN_PATH/config/system/" -mindepth 1 -maxdepth 1 -type d)
do
SYSTEM_APPLICATION="$(echo "$SOURCE_DIR" | sed 's|.*/||')"
case $SYSTEM_APPLICATION in
( ssh | sshd )
SYSTEM_DIR=/etc/ssh/${SYSTEM_APPLICATION}_config.d
;;
( * )
SYSTEM_DIR=''
;;
esac
[ "$SYSTEM_DIR" ] && sudo [ -d "$SYSTEM_DIR" ] \
|| continue
for SOURCE_CONFIG in $(find "$SOURCE_DIR" -mindepth 1 -maxdepth 1 -type f)
do
SYSTEM_CONFIG="$SYSTEM_DIR/$(basename -- "$SOURCE_CONFIG")"
sudo [ -f "$SYSTEM_CONFIG" ] && {
echo "detected existing config '$SYSTEM_CONFIG'; skipping"
continue
}
sudo ln -s "$SOURCE_CONFIG" "$SYSTEM_CONFIG"
done
done
}
#####################################################################
CONFIG__ENV() { CONFIG__ENV() {
local DEFAULT_CONFIG="$DOTWRYN_PATH/config/dotwryn.env.$1" local DEFAULT_CONFIG="$DOTWRYN_PATH/config/dotwryn.env.$1"
local LOCAL_CONFIG="$HOME/.config/wryn/env.$1" local LOCAL_CONFIG="$HOME/.config/wryn/env.$1"

View File

@ -22,7 +22,6 @@ jdk-openjdk
jq jq
lolcat lolcat
lxappearance lxappearance
monaspace-font
mono mono
ncurses ncurses
neofetch neofetch
@ -32,6 +31,7 @@ npm
ntp ntp
obs-studio obs-studio
openssh openssh
otf-monaspace
pam-fprint-grosshack pam-fprint-grosshack
picom picom
playerctl playerctl

View File

@ -36,4 +36,4 @@ INFO "installation complete: $(date)" 2>> "$LOGFILE"
yN 'keep logfile?' \ yN 'keep logfile?' \
|| { rm "$LOGFILE" || ERROR "unable to remove '$LOGFILE'" } || { rm "$LOGFILE" || ERROR "unable to remove '$LOGFILE'" }
SUCCESS "\n.wryn setup complete; have a nice day :)\n" SUCCESS "\n.wryn setup complete; have a nice day :)\n "