+ nas mount

This commit is contained in:
committer
2024-05-21 07:00:18 -05:00
parent 26b240729c
commit b73e5c7fe8
3 changed files with 76 additions and 13 deletions

View File

@@ -66,23 +66,22 @@ dsl1a() {
# alias np='nano -w PKGBUILD' # alias np='nano -w PKGBUILD'
# #alias more=less # #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() { # iso-mount() {
# sudo mount -o loop "$1" /media/iso # sudo mount -o loop "$1" /media/iso
# } # }
# alias iso-unmount="sudo umount /media/iso" # alias iso-unmount="sudo umount /media/iso"
# #
# # https://en.wikipedia.org/wiki/List_of_common_resolutions
# alias res-low="xrandr -s 1920x1080" # https://en.wikipedia.org/wiki/List_of_common_resolutions
# alias res-med="xrandr -s 2560x1440" alias res-low="xrandr -s 1920x1080"
# alias res-high="xrandr -s 3840x2160" alias res-med="xrandr -s 2560x1440"
# alias res-high="xrandr -s 3840x2160"
# # --- # # ---
# # misc # # misc

13
dots/systemd/nas.mount Normal file
View File

@@ -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

View File

@@ -16,6 +16,9 @@ if [ $# -lt 1 ]; then
fi fi
operation=$1 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_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${HOSTNAME}/options.sh
options_trg=/tmp/options.sh options_trg=/tmp/options.sh
rm -rf ${options_trg} rm -rf ${options_trg}
@@ -27,8 +30,8 @@ if [ -z "${OPTIONS_LOADED}" ]; then
exit 1 exit 1
fi fi
user=${USER} secrets_cred_path=/home/${user}/syncDir/secrets/toBeSources/cred.sh
clone_trg=${CLONE_TARGET_DIR} source ${secrets_cred_path}
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ # ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@@ -169,6 +172,17 @@ if [ ${operation} == "dots" ] ; then
file_path=/etc file_path=/etc
deploy_file "${dots_trg}/environment/${file_name}" "${file_path}/${file_name}" no_chown 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 # 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_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 #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 # programs
# ---------- # ----------