Skip to content

Commit

Permalink
initial upload
Browse files Browse the repository at this point in the history
  • Loading branch information
James Gillman committed Sep 21, 2023
0 parents commit e521263
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# OpenBSD-Bootstrap

My OpenBSD dotfiles and configuration.
Shamelessly stolen and heavily modifed from: https://www.github.com/crhenr/dotfiles

## How to install

1. cd into directory where you will clone this.
2. Run the following commands:
```
su
pkg_add git
git clone https://gitlab.com/safetypanda/openbsd_bootstrap.git
sh ./install.sh
```
49 changes: 49 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/sh

echo -n "Move dotfiles to which user? "
read user

echo "[*] Installing necessary software..."
pkg_add feh i3lock scrot ImageMagick vim thunar chromium neofetch arandr ruby ruby-shims fish jdk portslist unzip

echo "[*] Copying dotfiles..."
cp .fvwmrc /home/$user/.fvwmrc
cp .vimrc /home/$user/.vimrc
cp .Xdefaults /home/$user/.Xdefaults
mv .config /home/$user/

echo "exec fvwm" >> /home/$user/.xinitrc

echo "[*] Make Dev folder"
mkdir /home/$user/dev

echo "[*] Chown -R Home Folder"
chown -R $user /home/$user

echo [*] Change Shell to Fish
chsh -s /usr/local/bin/fish $user

echo [*] Fetch and configure Ports
cd /tmp
ftp https://cdn.openbsd.org/pub/OpenBSD/$(uname -r)/{ports.tar.gz,SHA256.sig}
cd /usr
tar xzf /tmp/ports.tar.gz

echo "WRKOBJDIR=/usr/obj/ports" >> /etc/mk.conf
echo "DISTDIR=/usr/distfiles" >> /etc/mk.conf
echo "PACKAGE_REPOSITORY=/usr/packages" >> /etc/mk.conf

echo "[*] Configure doas(1)"
touch /etc/doas.conf
echo "permit persist keepenv $user as root" > /etc/doas.conf

echo "[*] Configure Memory Limits for Programs
usermod -G staff $user
cp -f ./login.conf /etc/login.conf
echo "[*] Run Syspatch"
syspatch
echo "[*] Done."
neofetch
119 changes: 119 additions & 0 deletions login.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# $OpenBSD: login.conf,v 1.23 2022/02/28 21:23:38 sthen Exp $

#
# Sample login.conf file. See login.conf(5) for details.
#

#
# Standard authentication styles:
#
# passwd Use only the local password file
# chpass Do not authenticate, but change user's password (change
# the YP password if the user has one, else change the
# local password)
# lchpass Do not login; change user's local password instead
# ldap Use LDAP authentication
# radius Use RADIUS authentication
# reject Use rejected authentication
# skey Use S/Key authentication
# activ ActivCard X9.9 token authentication
# crypto CRYPTOCard X9.9 token authentication
# snk Digital Pathways SecureNet Key authentication
# token Generic X9.9 token authentication
# yubikey YubiKey authentication
#

# Default allowed authentication styles
auth-defaults:auth=passwd,skey:

# Default allowed authentication styles for authentication type ftp
auth-ftp-defaults:auth-ftp=passwd:

#
# The default values
# To alter the default authentication types change the line:
# :tc=auth-defaults:\
# to read something like: (enables passwd, "myauth", and activ)
# :auth=passwd,myauth,activ:\
# Any value changed in the daemon class should be reset in default
# class.
#
default:\
:path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
:umask=022:\
:datasize-max=1024M:\
:datasize-cur=1024M:\
:maxproc-max=256:\
:maxproc-cur=128:\
:openfiles-max=1024:\
:openfiles-cur=512:\
:stacksize-cur=4M:\
:localcipher=blowfish,a:\
:tc=auth-defaults:\
:tc=auth-ftp-defaults:

#
# Settings used by /etc/rc and root
# This must be set properly for daemons started as root by inetd as well.
# Be sure to reset these values to system defaults in the default class!
#
daemon:\
:ignorenologin:\
:datasize=4096M:\
:maxproc=infinity:\
:openfiles-max=1024:\
:openfiles-cur=128:\
:stacksize-cur=8M:\
:tc=default:

#
# Staff have fewer restrictions and can login even when nologins are set.
#
staff:\
:datasize-cur=6144M:\ [Higher Mem Limit for Web Browser]
:datasize-max=infinity:\
:maxproc-max=512:\
:maxproc-cur=256:\
:ignorenologin:\
:requirehome@:\
:tc=default:

#
# Authpf accounts get a special motd and shell
#
authpf:\
:welcome=/etc/motd.authpf:\
:shell=/usr/sbin/authpf:\
:tc=default:

#
# Building ports with DPB uses raised limits
#
pbuild:\
:datasize-max=infinity:\
:datasize-cur=8192M:\
:maxproc-max=1024:\
:maxproc-cur=512:\
:stacksize-cur=8M:\
:priority=5:\
:tc=default:

#
# Override resource limits for certain daemons started by rc.d(8)
#
bgpd:\
:datasize=16384M:\
:openfiles=512:\
:tc=daemon:

unbound:\
:openfiles=512:\
:tc=daemon:

vmd:\
:datasize=16384M:\
:tc=daemon:

xenodm:\
:openfiles=512:\
:tc=daemon:
Binary file added openbsd-dark/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e521263

Please sign in to comment.