feat: freebsd examples and improved knowledge

This commit is contained in:
Michele Cereda
2023-05-13 16:44:07 +02:00
parent 02dd636ed4
commit 17eba05530
4 changed files with 243 additions and 10 deletions

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env sh
if [ "$(id -ru)" -eq 0 ]
then
echo "Run this again as 'root'"
exit 1
fi
# Package management
pkg bootstrap
pkg update
pkg install -y \
'vim' \
'zsh' 'zsh-autosuggestions' 'zsh-completions' 'zsh-navigation-tools' 'zsh-syntax-highlighting'
# Non-'root' user management
pw groupmod 'wheel' -m 'username'
cat > '/home/username/.zshrc' <<-EOF
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/local/share/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
bindkey -e
zstyle :compinstall filename ~/.zshrc
autoload -Uz compinit
compinit
EOF
chown 'username':'usergroup' '/home/username/.zshrc'
chmod 'u=rw,go=r' '/home/username/.zshrc'
chpass -s "$(grep 'bin/zsh' '/etc/shells')" 'username'

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env sh
if [ "$(id -ru)" -eq 0 ]
then
echo "Run this again as 'root'"
exit 1
fi
# Package management
# Use 'virtualbox-ose-additions-nox11' for console-only systems.
pkg bootstrap
pkg update
pkg install -y 'virtualbox-ose-additions'
# Start VirtualBox services at boot
sysrc vboxguest_enable="YES"
sysrc vboxservice_enable="YES"
# NTP workaround
# Needed if NTP or NTPDate are used
sysrc vboxservice_flags="--disable-timesync"