aboutsummaryrefslogtreecommitdiff
path: root/distro/netbsd.sh
blob: e9c3d57bc522f3040ef7c92fed2f0e89246d66e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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