From b73e5c7fe8c458440ff27e1b58e9e14a41f8044b Mon Sep 17 00:00:00 2001 From: committer Date: Tue, 21 May 2024 07:00:18 -0500 Subject: [PATCH] + nas mount --- dots/bash/.bashrc | 21 ++++++++-------- dots/systemd/nas.mount | 13 ++++++++++ scripts/99_deploy.sh | 55 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 76 insertions(+), 13 deletions(-) create mode 100644 dots/systemd/nas.mount diff --git a/dots/bash/.bashrc b/dots/bash/.bashrc index e8bd0df..026db78 100644 --- a/dots/bash/.bashrc +++ b/dots/bash/.bashrc @@ -66,23 +66,22 @@ dsl1a() { # alias np='nano -w PKGBUILD' # #alias more=less +# --- +# sys stuff +# --- +alias nas-mount="sudo systemctl start nas.mount" +alias nas-unmount="sudo systemctl stop nas.mount" -# # --- -# # sys stuff -# # --- -# alias nas-mount="sudo systemctl start media-nas.mount" -# alias nas-unmount="sudo systemctl stop media-nas.mount" -# # iso-mount() { # sudo mount -o loop "$1" /media/iso # } # alias iso-unmount="sudo umount /media/iso" # -# # https://en.wikipedia.org/wiki/List_of_common_resolutions -# alias res-low="xrandr -s 1920x1080" -# alias res-med="xrandr -s 2560x1440" -# alias res-high="xrandr -s 3840x2160" -# + +# https://en.wikipedia.org/wiki/List_of_common_resolutions +alias res-low="xrandr -s 1920x1080" +alias res-med="xrandr -s 2560x1440" +alias res-high="xrandr -s 3840x2160" # # --- # # misc diff --git a/dots/systemd/nas.mount b/dots/systemd/nas.mount new file mode 100644 index 0000000..348e1fd --- /dev/null +++ b/dots/systemd/nas.mount @@ -0,0 +1,13 @@ +[Unit] +Description=Mount of NAS (/mnt/nas) + +[Mount] +What=//192.168.1.222/fro +Where=/mnt/nas +Type=cifs +Options=iocharset=utf8,rw,file_mode=0777,dir_mode=0777,user=[USERNAME],password=[PASSWORD] +TimeoutSec=30 + +[Install] +WantedBy=remote-fs.target +WantedBy=multi-user.target diff --git a/scripts/99_deploy.sh b/scripts/99_deploy.sh index fd6bfcd..299f027 100644 --- a/scripts/99_deploy.sh +++ b/scripts/99_deploy.sh @@ -16,6 +16,9 @@ if [ $# -lt 1 ]; then fi operation=$1 +user=${USER} +clone_trg=${CLONE_TARGET_DIR} + options_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${HOSTNAME}/options.sh options_trg=/tmp/options.sh rm -rf ${options_trg} @@ -27,8 +30,8 @@ if [ -z "${OPTIONS_LOADED}" ]; then exit 1 fi -user=${USER} -clone_trg=${CLONE_TARGET_DIR} +secrets_cred_path=/home/${user}/syncDir/secrets/toBeSources/cred.sh +source ${secrets_cred_path} # ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ @@ -169,6 +172,17 @@ if [ ${operation} == "dots" ] ; then file_path=/etc deploy_file "${dots_trg}/environment/${file_name}" "${file_path}/${file_name}" no_chown + # mounts + file_name=nas.mount + file_path=/etc/systemd/system + deploy_file "${dots_trg}/systemd/${file_name}" "${file_path}/${file_name}" no_chown + + sed -i 's|[USERNAME]|klevstul|g' "${file_path}/${file_name}" + sed -i 's|[PASSWORD]|${LILLESORTEBOKS}|g' "${file_path}/${file_name}" + + mount_target=/mnt/nas + mkdir -p ${mount_target} + # ---------- # printing # @@ -188,6 +202,43 @@ if [ ${operation} == "dots" ] ; then #lpadmin -p Brother_HL-L2310D_series -D "Brother HL-L2310D_series" -E -v usb://Brother/HL-L2310D%20series?serial=E78096L7N181893 -m lsb/usr/cupsfilters/brother-HLL2310D-cups-en.ppd #lpadmin -p Brother_QL-700 -D "Brother QL-700" -E -v usb://Brother/QL-700?serial=000L0Z530516 -m brother_ql700_printer_en.ppd + + + + + + + + + +# EXAMPLE OF FILE MANIPULATION (from lnxPub's `cli/2103mjr/scr/80_urxvt.sh`) +# # ----- +# # update .Xresources +# # ----- +# file=$HOME/.Xresources +# +# # update font setting (so it's understandable by the extension) +# /tmp/99_key_value_modifier.sh URxvt.font xft:NotoSansMono-Light:size=12 : $file +# +# # enable the "resize-font" extension +# /tmp/99_comment_add_remove.sh remove ! Rxvt.perl-ext-common $file +# /tmp/99_key_value_modifier.sh Rxvt.perl-ext-common resize-font : $file +# +# # make the terminal's background transparent +# /tmp/99_comment_add_remove.sh remove '! ' 'URxvt\*inheritPixmap' $file +# /tmp/99_comment_add_remove.sh remove '! ' 'URxvt\*transparent' $file +# /tmp/99_comment_add_remove.sh remove '! ' 'URxvt\*shading' $file +# /tmp/99_key_value_modifier.sh 'URxvt\*shading' 30 : $file + + + + + + + + + + # ---------- # programs # ----------