aboutsummaryrefslogtreecommitdiff
path: root/distro
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2024-02-01 22:34:03 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2024-02-01 22:34:03 -0500
commitd47e29c2f4be62ee250a054f4e6473604b84059c (patch)
tree6700747de4ca4837d09d1684f16ccff95c693eb8 /distro
parent4e85648f2fc254b22542720b8f5d0cf3fe4d27bd (diff)
downloaddotfiles-d47e29c2f4be62ee250a054f4e6473604b84059c.tar.gz
dotfiles-d47e29c2f4be62ee250a054f4e6473604b84059c.tar.xz
Add a script for NetBSD setup
Diffstat (limited to 'distro')
-rwxr-xr-xdistro/netbsd.sh75
1 files changed, 75 insertions, 0 deletions
diff --git a/distro/netbsd.sh b/distro/netbsd.sh
new file mode 100755
index 0000000..e9c3d57
--- /dev/null
+++ b/distro/netbsd.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+set -ex
+
+if [ "$(id -u)" -eq 0 ] ; then
+
+ pkgin install \
+ ca-certificates \
+ git \
+ mozilla-rootcerts \
+ neofetch \
+ neovim \
+ oksh \
+ ripgrep \
+ rsync \
+ sudo \
+ go \
+ opendoas \
+ tmux \
+
+
+ mozilla-rootcerts install || echo "It's fine..."
+
+ echo "permit nopass :wheel as root" > /usr/pkg/etc/doas.conf
+
+ exit 0;
+
+fi
+
+if ! [ -r /usr/pkg/etc/doas.conf ] ; then
+ echo "Run as root first, then as a regular user"
+fi
+
+doas pkgin install \
+ firefox \
+ xfce4 \
+ shellcheck \
+ tigervnc \
+ pkg-config \
+ picom \
+ feh \
+
+
+cd "$HOME"
+
+for pkg in dwm st dmenu ; do
+
+ mkdir -p scm/x/$pkg
+ cd scm/x/$pkg
+ ! [ -d .git ] && git clone -b netbsd https://git.riedstra.dev/x/$pkg .
+
+ make
+ doas make clean install
+
+ cd -
+
+done
+
+# Probably better ways of doing this...
+if ! grep -q '^export LD_LIBR' ~/.kshrc.local ; then
+cat >> ~/.kshrc.local <<EOF
+export LD_LIBRARY_PATH="/usr/X11R7/lib/"
+EOF
+fi
+
+if ! [ -f ~/.xinitrc ] ; then
+cat > ~/.xinitrc <<EOF
+#!/bin/sh
+export ENV=$HOME/.kshrc
+. ~/.kshrc
+x/wallpaper "$HOME/.wallpaper.jpg" &
+exec dwm
+EOF
+fi
+
+chmod +x ~/.xinitrc