Update 2022-12-07 08:21 OpenBSD/amd64

This commit is contained in:
c0dev0id 2022-12-07 08:21:56 +01:00
parent c3cd4ba764
commit 7948684fdf
23 changed files with 591 additions and 0 deletions

View File

@ -0,0 +1,44 @@
xlogin*login.translations: #override \
Ctrl<Key>R: abort-display()\n\
<Key>F1: set-session-argument(failsafe) finish-field()\n\
<Key>Left: move-backward-character()\n\
<Key>Right: move-forward-character()\n\
<Key>Home: move-to-begining()\n\
<Key>End: move-to-end()\n\
Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\
<Key>KP_Enter: set-session-argument() finish-field()\n\
Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
<Key>Return: set-session-argument() finish-field()
xlogin*greeting: Login
xlogin.Login.sepWidth: 1
xlogin*fail: Login incorrect or forbidden
xlogin*greetFace: Monospace-20:dpi=100
xlogin*face: Monospace-16:dpi=100
xlogin*promptFace: Monospace-16:dpi=100
xlogin*failFace: Monospace-16:dpi=100
xlogin*borderWidth: 1
xlogin*frameWidth: 2
xlogin*innerFramesWidth: 0
xlogin.Login.sepWidth: 0
xlogin*hiColor: #181818
xlogin*shdColor: #181818
xlogin*background: #000000
xlogin*inpColor: #181818
xlogin*failColor: #aa0000
xlogin.Login.echoPasswd: true
xlogin.Login.namePrompt:
xlogin.Login.passwdPrompt:
xlogin*borderWidth: 3
xlogin*frameWidth: 5
xlogin*innerFramesWidth: 1
*Foreground: #cccccc
*Background: #000000
xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_15bpp.xpm
xlogin*useShape: false
xlogin*logoPadding: 10

7
.etc/X11/xenodm/Xsetup_0 Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# $OpenBSD: Xsetup_0,v 1.5 2018/07/17 11:52:12 matthieu Exp $
#xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
xset fp+ /home/sdk/.fonts
xset fp rehash
xsetroot -solid black

23
.etc/X11/xorg.conf Normal file
View File

@ -0,0 +1,23 @@
Section "Device"
Identifier "Intel Graphics"
Driver "modesetting"
Option "AsyncFlipSecondaries" "on"
Option "VariableRefresh" "on"
Option "TearFree" "on"
EndSection
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
Option "Device" "/dev/wsmouse0"
#Option "Device" "wsmouse"
Option "Protocol" "auto-dev"
Option "ClickPad" "true"
Option "VertTwoFingerScroll" "true"
Option "HorizTwoFingerScroll" "true"
Option "TapButton1" "1" # Left button
Option "TapButton2" "3" # Right button
Option "PalmDetect" "true"
EndSection

3
.etc/amd/amd.tweety Normal file
View File

@ -0,0 +1,3 @@
/defaults rhost:=192.168.1.20;type:=nfs
MEDIA rfs:=/tank/MEDIA
DATA rfs:=/tank/DATA

1
.etc/amd/master Normal file
View File

@ -0,0 +1 @@
/mnt/nfs/tweety amd.tweety

View File

@ -0,0 +1,60 @@
{
"AutoFillEnabled": false,
"AutofillAddressEnabled": false,
"UrlKeyedAnonymizedDataCollectionEnabled": false,
"AutofillCreditCardEnabled": false,
"AllowPopupsDuringPageUnload": false,
"ApplicationLocaleValue": "en",
"BackgroundModeEnabled": false,
"BookmarkBarEnabled": false,
"BlockThirdPartyCookies": true,
"BookmarkBarEnabled": false,
"BrowserSignin": false,
"BuiltInDnsClientEnabled": false,
"CloudPrintProxyEnabled": false,
"CloudPrintSubmitEnabled": false,
"DefaultBrowserSettingEnabled": false,
"DefaultGeolocationSetting": 1,
"DefaultNotificationsSetting": 2,
"DefaultPopupsSetting": 2,
"DefaultSearchProviderAlternateURLs": [ ],
"DefaultSearchProviderEnabled": true,
"DefaultSearchProviderSearchURL": "https://start.duckduckgo.com/?q={searchTerms}",
"DefaultWebUsbGuardSetting": 2,
"Disable3DAPIs": true,
"EnableMediaRouter": false,
"ExtensionInstallForcelist": [ "cjpalhdlnbpafiamejdnhcphjbkeiagm" ],
"ForceGoogleSafeSearch": false,
"HomepageIsNewTabPage": true,
"HomepageLocation": "about:blank",
"ImportAutofillFormData": false,
"ImportSavedPasswords": false,
"IncognitoEnabled": true,
"NewTabPageLocation": "about:blank",
"PasswordLeakDetectionEnabled": false,
"DownloadDirectory": "/home/${user_name}/downloads",
"DefaultDownloadDirectory": "/home/${user_name}/downloads",
"NetworkPredictionOptions": false,
"FullscreenAllowed": false,
"DisableScreenshots": true,
"MetricsReportingEnabled": false,
"ImportSearchEngine": false,
"ImportSavedPasswords": false,
"ImportHistory": false,
"ImportBookmarks": false,
"ImportAutofillFormData": false,
"PasswordManagerEnabled": false,
"PromotionalTabsEnabled": false,
"RestoreOnStartup": 5,
"PrintHeaderFooter": false,
"SSLErrorOverrideAllowed": true,
"QuicAllowed": false,
"SafeBrowsingEnabled": false,
"SearchSuggestEnabled": false,
"SigninAllowed": false,
"SpellCheckServiceEnabled": false,
"ShowHomeButton": false,
"SpellcheckEnabled": false,
"SyncDisabled": true,
"TranslateEnabled": false
}

1
.etc/dhclient.conf Normal file
View File

@ -0,0 +1 @@
supersede domain-name-servers 127.0.0.1;

14
.etc/dhcp6c.conf Normal file
View File

@ -0,0 +1,14 @@
# The following is a sample configuration for a client on a LAN
# where IPv6 addresses are assigned via DHCPv6 ("stateful address
# assignment"). Use this if you want the client to query the
# DHCPv6 server for an IPv6 address and for DNS servers, as in
# traditional IPv4 DHCP.
interface trunk0 {
send ia-na 0;
send rapid-commit;
send domain-name-servers;
};
id-assoc na {
};

15
.etc/doas.conf Normal file
View File

@ -0,0 +1,15 @@
permit keepenv nopass sdk as _pbuild
permit keepenv nopass sdk as _pfetch
permit keepenv nopass sdk as root
permit keepenv nopass sdk as sdk
permit keepenv nopass sdk as cvs
permit keepenv nopass sdk as build
permit keepenv nopass root as _pbuild
permit keepenv nopass root as _pfetch
permit keepenv nopass root as root
permit keepenv nopass root as sdk
permit keepenv nopass root as cvs
permit keepenv nopass root as build
permit keepenv nopass build as sdk

8
.etc/fbtab Normal file
View File

@ -0,0 +1,8 @@
# $OpenBSD: fbtab.head,v 1.2 1999/05/05 06:56:34 deraadt Exp $
# login(1) reads this file to determine which devices should be chown'd to
# the new user. Format is:
# login-tty perm device:[device]:...
/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128
# samples
#/dev/ttyC0 0600 /dev/fd0
/dev/ttyC0 0660 /dev/usb*:/dev/ugen*:/dev/drm*:/dev/video*

4
.etc/fstab.local Normal file
View File

@ -0,0 +1,4 @@
192.168.1.20:/tank/priv /tank/priv nfs rw,noatime,intr,nodev,nosuid,noexec,noauto 0 0
192.168.1.20:/tank/pub /tank/pub nfs rw,noatime,intr,nodev,nosuid,noexec,noauto 0 0
192.168.1.20:/tank/scanner /tank/scanner nfs rw,noatime,intr,nodev,nosuid,noexec,noauto 0 0
192.168.1.20:/buffer /tank/buffer nfs rw,noatime,intr,nodev,nosuid,noexec,noauto 0 0

114
.etc/login.conf Normal file
View File

@ -0,0 +1,114 @@
# $OpenBSD: login.conf,v 1.19 2021/04/25 16:36:56 mortimer 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
# 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
# tis TIS Firewall Toolkit 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=infinity:\
: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=7936M:\
: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=384:\
:stacksize-cur=8M:\
:priority=5:\
:tc=default:
#
# Override resource limits for certain daemons started by rc.d(8)
#
bgpd:\
:openfiles=512:\
:tc=daemon:
unbound:\
:openfiles=512:\
:tc=daemon:
xenodm:\
:openfiles=512:\
:tc=daemon:

4
.etc/mk.conf Normal file
View File

@ -0,0 +1,4 @@
.include "/usr/ports/infrastructure/templates/mk.conf.template"
FETCH_PACKAGES=
PORTS_PRIVSEP=yes
SUDO=doas

10
.etc/rc.conf.local Normal file
View File

@ -0,0 +1,10 @@
#sndiod_flags=-f rsnd/0 -F rsnd/1 -F rsnd/2 -F rsnd/3 -m play,rec -s default -m mon -s mon
apmd_flags=-H -z 5
httpd_flags=
lpd_flags=
multicast=YES
pkg_scripts=messagebus vnstatd cupsd
portmap_flags=
sndiod_flags=-b960 -f rsnd/0 -F rsnd/1 -F rsnd/2 -F rsnd/3 -m play -s default
unbound_flags=
xenodm_flags=

27
.etc/rc.local Normal file
View File

@ -0,0 +1,27 @@
# bioctl -c C -p /etc/keyfile -l 7233728656dc5031.a softraid0
# mount /data
if [ ! -f /usr/local/sbin/dhcp6c ]; then
logger "Wide DHCPv6: not installed"
exit
fi
if [ ! -f /etc/dhcp6c.conf ]; then
logger "Wide DHCPv6: dhcp6c.conf not found"
exit
fi
if [ ! -f /etc/hostname.trunk0 ]; then
logger "Wide DHCPv6: no trunk device found"
exit
fi
if [ ! -f /etc/dhcp6cctlkey ]; then
logger "Wide DHCPv6: generating dhcp6cctlkey"
/usr/bin/openssl rand -base64 48 > /etc/dhcp6cctlkey
chmod 600 /etc/dhcp6cctlkey
fi
logger "Starting Wide DHCPv6"
/usr/local/sbin/dhcp6c -c /etc/dhcp6c.conf trunk0

17
.etc/sysclean.ignore Normal file
View File

@ -0,0 +1,17 @@
/tank
/etc/X11/xorg.conf
/etc/mail/secrets
/opt
/var/ccache
/usr/share/terminfo/s/st-mono
/usr/share/terminfo/s/st-meta
/usr/share/terminfo/s/st-meta-256color
/usr/share/terminfo/s/st-bs
/usr/share/terminfo/s/st-bs-256color
/usr/www
/rbsd
/run
/build
/data
/usr/ports.git
/var/spool/cups

38
.etc/sysctl.conf Normal file
View File

@ -0,0 +1,38 @@
## shared memory limits (chrome needs a ton)
kern.shminfo.shmall=24576 # default: kern.shminfo.shmall=8192
kern.shminfo.shmmax=100663296 # default: kern.shminfo.shmmax=33554432
kern.shminfo.shmmni=384 # default: kern.shminfo.shmmni=128
#
## semaphores
kern.shminfo.shmseg=384 # default: kern.shminfo.shmseg=128
kern.seminfo.semmns=180 # default: kern.seminfo.semmns=60
kern.seminfo.semmni=30 # default: kern.seminfo.semmni=10
# limits
#kern.maxproc=16384 # default: kern.maxproc=1310
#kern.maxfiles=8192 # default: kern.maxfiles=7030
#kern.bufcachepercent=40 # default: kern.bufcachepercent=20
#kern.maxvnodes=553998 # default: kern.maxvnodes=276999
#kern.somaxconn=2048 # default: kern.somaxconn=128
# acpi
machdep.lidaction=0 # 0=none, 1=suspend, 2=hibernate
kern.allowkmem=1 # userland access to /dev/(k)mem (for dmidecode)
#machdep.allowaperture=2 # See xf86(4)
# debug
ddb.console=1 # 1=Permit entry of ddb from the console
ddb.log=1 # 1=Log ddb output in kernel message buffer
kern.allowdt=1 # allow dynamic tracing with btrace and /dev/dt
#kern.timecounter.hardware=tsc
kern.video.record=1 # thinkshutter disables
kern.audio.record=1 # no mic support without headset
#hw.smt=1
#machdep.hwp.min_perf=255
#machdep.hwp.max_perf=255
#machdep.hwp.desired_perf=255
#machdep.hwp.epp_bias=performance
#kern.wxabort=1

2
.etc/sysmerge.ignore Normal file
View File

@ -0,0 +1,2 @@
/etc/X11/xenodm/Xsetup_0
/etc/X11/xenodm/Xresources

1
.etc/unwind.conf Normal file
View File

@ -0,0 +1 @@
preference { dhcp }

165
.etc/vimrc-root Normal file
View File

@ -0,0 +1,165 @@
" VIM CORE
set nocompatible " enable advanced features
set autochdir " current dir is vim workdir
set wildmenu " complete all filetypes
set mouse=v " don't interract with the mouse
set laststatus=2 " always show the status line
set keywordprg=":help" " show vim help when hitting "K"
set backspace=indent,eol,start " make backspace like in a normal editor
set ttimeout " set timeout for key combinations to on
set ttimeoutlen=50 " set timeout for key combinations to 50ms
set number " enable line numbers
"set relativenumber " enable relative line numbers (slow)
"set cursorline " highlight line number + line with cursor (slow)
set lazyredraw
set spelllang=de,en
syntax enable " enable syntax plugin (builtin)
filetype plugin indent on " load indent and plugin based on filetype
" INDENTATION
set autoindent " start new lines on same indent level
set smartindent " smart indentation for programming languages
set breakindent " visually wrapped lines will respect the indent level
set cindent " smart indentation for C programming
set formatprg=par\ -B+.,\\-\\!\\?\\\"\\\'\\*\\<\ -w72qie
" SEARCH
set incsearch " search while typing
set hlsearch " highlight all search matches
set wrapscan " search continues on top
set ignorecase " search case insensitive
set smartcase " search case sensitive once a capital letter is used
" SPACES (TABS)
set tabstop=4 " one tab counts X spaces (used by retab)
set softtabstop=4
set shiftwidth=4 " number of spaces used to indent
set expandtab " use spaces when hitting <tab>
set smarttab " if the line starts with space, backspace will delete "shiftwidth"
set textwidth=0
set list
set listchars=tab:>-
let c_space_errors=1
" FOLDING
set foldmethod=indent " Fold at indent level
set foldnestmax=3 " Fold max 3 levels deep
set foldlevel=1
set foldlevelstart=10 " Start to fold at level 0
" TEMPORARY FILES
set undofile " save undo history, so it can be restored after reopening a file
set undodir=~/.vim/undo// " save undo history here (don't clutter the filesystem)
set backup " create backups
set backupcopy=yes
set backupdir=~/.vim/backup// " save backup files here (don't clutter the filesystem)
set backupskip=mutt-* " do not create backups of emails
set directory=~/.vim/swapfiles// " move swapfiles out of the way
" LOOK N FEEL
set t_Co=256 " for terminal with 256 colors
set background=dark " I prefer dark backgrounds
highlight Normal ctermbg=NONE guibg=#181818 " transparent background (terminal), sane color (gui)
highlight SpellBad cterm=NONE ctermfg=darkred ctermbg=NONE " make spellcheck work with cursorline (set fg color)
highlight ColorColumn72 ctermfg=03
call matchadd('ColorColumn72', '\%72v', 100) " highlight column 78 in green
match ErrorMsg '\(TODO\|FIXME\|OPTIMIZE\|BUG\|workaround\|WTF\)' " highlight code comment keywords
" VIMDIFF COLOR FIX
highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
" CURSOR
let &t_SI = "\e[6 q" " change cursor to ibeam in inser mode
let &t_EI = "\e[2 q" " change cursort to block in normal mode
" GRAPHICAL VIM / GVIM
set guifont=Fira\ Code\ 13 " Use this font in gvim
set guioptions= " don't show any gui elements
" TAB NAVIGATION
set tabpagemax=25 " allowed max tabs (10)
inoremap [5^ <Esc>:tabn<CR> " Strg+PgUp: Next tab
nnoremap [5^ :tabn<CR>
inoremap [6^ <Esc>:tabp<CR> " Strg+PgDown: Previous tab
nnoremap [6^ :tabp<CR>
inoremap  <Esc>:tabnew<CR> " Strg+T: New tab
nnoremap  :tabnew<CR>
" SCREEN FIXES
map [7~ <Home>
imap [7~ <Home>
nmap [7~ <Home>
map [8~ <End>
imap [8~ <End>
nmap [8~ <End>
map [5~ <PageUp>
imap [5~ <PageUp>
nmap [5~ <PageUp>
map [6~ <PageDown>
imap [6~ <PageDown>
nmap [6~ <PageDown>
" NETRW
let g:netrw_banner = 0 " disable annoying banner
let g:netrw_browse_split = 4 " open in prior window
let g:netrw_altv = 1 " open splits to the right
let g:netrw_liststyle = 3 " tree view
" TAGS FILE
set tags=./tags; " Search for tags file backwards recursive
nnoremap gt <c-]> " Jump to tag (go tag)
nnoremap gb <c-o> " Jump to last position (go back)
nmap gh :FSHere<CR> " Jump to corresponding header file (go header)
" SUDO SAVE
cmap w!! w !sudo tee > /dev/null
" REMEMBER LAST CURSOR POSITION
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" OPEN HELP IN A NEW TAB
command! -nargs=1 -complete=help H :tabnew | :set buftype=help | :h <args>
" NAVIGATE ON VISUAL LINES (SOFT WRAP)
imap <silent> <Down> <C-o>gj
imap <silent> <Up> <C-o>gk
nmap <silent> <Down> gj
nmap <silent> <Up> gk
" USE ARROW / VIM KEYS INSIDE OMNIBOX
inoremap <expr> j pumvisible() ? '<C-n>' : 'j'
inoremap <expr> k pumvisible() ? '<C-p>' : 'k'
inoremap <expr> <Down> pumvisible() ? '<C-n>' : '<Down>'
inoremap <expr> <Up> pumvisible() ? '<C-p>' : '<Up>'
" AUTO BRACKET
inoremap {<CR> {<CR> <CR>}<up><right>
" TREAT C FILES AS C, NOT C++
augroup project
autocmd!
autocmd BufRead,BufNewFile *.h,*.c set filetype=c.doxygen
augroup END
function! Copy()
:'<,'>w! /tmp/vimcopy.txt
endfunction
function! Paste()
:r /tmp/vimcopy.txt
endfunction
au BufReadPost * if getfsize(bufname("%")) > 512*1024 |
\ set syntax= |
\ set nonumber |
\ endif

1
.etc/weekly.local Normal file
View File

@ -0,0 +1 @@
wget -S -N https://www.internic.net/domain/named.cache -O /etc/unbound/root.hints

2
.etc/wsconsctl.conf Normal file
View File

@ -0,0 +1,2 @@
mouse.tp.disable=1
display.brightness=50

30
.etc/xorg.conf Normal file
View File

@ -0,0 +1,30 @@
Section "InputDevice"
Identifier "w_stylus"
Driver "usbtablet"
Option "Type" "stylus"
Option "Device" "/dev/uhid0"
Option "Mode" "Absolute"
EndSection
Section "InputDevice"
Identifier "w_eraser"
Driver "usbtablet"
Option "Type" "eraser"
Option "Device" "/dev/uhid0"
Option "Mode" "Absolute"
EndSection
Section "ServerLayout"
Identifier "Layout0"
Screen "Screen0"
InputDevice "int_kbd" "CoreKeyboard"
InputDevice "int_mouse" "CorePointer"
# Wacom
InputDevice "w_stylus" "SendCoreEvents"
InputDevice "w_eraser" "SendCoreEvents"
EndSection
Section "ServerFlags"
Option "AllowMouseOpenFail" "True"
EndSection