From d47e29c2f4be62ee250a054f4e6473604b84059c Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Thu, 1 Feb 2024 22:34:03 -0500 Subject: Add a script for NetBSD setup --- distro/netbsd.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100755 distro/netbsd.sh (limited to 'distro') 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 < ~/.xinitrc <