initial commit

This commit is contained in:
Thilo Billerbeck 2023-05-01 00:26:39 +02:00
commit 757ec9bab0
23 changed files with 1685 additions and 0 deletions

4
dotfiles/.gitmodules vendored Normal file
View file

@ -0,0 +1,4 @@
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot
ignore = dirty

46
dotfiles/alacritty.yml Normal file
View file

@ -0,0 +1,46 @@
window:
decorations: full
dynamic_title: true
gtk_theme_variant: None
background_opacity: 1.0
font:
normal:
family: FiraMono Nerd Font
bold:
family: FiraMono Nerd Font
style: Bold
size: 14
offset:
y: 1
cursor:
style:
shape: Beam
# Colors (Snazzy)
colors:
# Default colors
primary:
background: "0x282a36"
foreground: "0xeff0eb"
# Normal colors
normal:
black: "0x282a36"
red: "0xff5c57"
green: "0x5af78e"
yellow: "0xf3f99d"
blue: "0x57c7ff"
magenta: "0xff6ac1"
cyan: "0x9aedfe"
white: "0xf1f1f0"
# Bright colors
bright:
black: "0x686868"
red: "0xff5c57"
green: "0x5af78e"
yellow: "0xf3f99d"
blue: "0x57c7ff"
magenta: "0xff6ac1"
cyan: "0x9aedfe"
white: "0xf1f1f0"

11
dotfiles/aliases Normal file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
alias pub-ipv4="curl ip4.clerie.de"
alias serve="python -m SimpleHTTPServer 8080"
alias week='date +%V'
alias path='echo -e ${PATH//:/\\n}'
alias distro='cat /etc/*-release'
alias reload='source ~/.zshrc'
alias undo-git-reset-head="git reset 'HEAD@{1}'"
alias update-local="bash $HOME/.dotfiles/install"
alias fix-ssh-key-permissions="bash $HOME/.dotfiles/scripts/fix-ssh-key-permissions.sh"

3
dotfiles/bash_logout Normal file
View file

@ -0,0 +1,3 @@
#
# ~/.bash_logout
#

7
dotfiles/bash_profile Normal file
View file

@ -0,0 +1,7 @@
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -e /home/thilo/.nix-profile/etc/profile.d/nix.sh ]; then . /home/thilo/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
. "$HOME/.cargo/env"

175
dotfiles/bashrc Normal file
View file

@ -0,0 +1,175 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ -f ~/.welcome_screen ]] && . ~/.welcome_screen
_set_my_PS1() {
PS1='[\u@\h \W]\$ '
if [ "$(whoami)" = "liveuser" ] ; then
local iso_version="$(grep ^VERSION= /usr/lib/endeavouros-release 2>/dev/null | cut -d '=' -f 2)"
if [ -n "$iso_version" ] ; then
local prefix="eos-"
local iso_info="$prefix$iso_version"
PS1="[\u@$iso_info \W]\$ "
fi
fi
}
_set_my_PS1
unset -f _set_my_PS1
ShowInstallerIsoInfo() {
local file=/usr/lib/endeavouros-release
if [ -r $file ] ; then
cat $file
else
echo "Sorry, installer ISO info is not available." >&2
fi
}
alias ls='ls --color=auto'
alias ll='ls -lav --ignore=..' # show long listing of all except ".."
alias l='ls -lav --ignore=.?*' # show long listing but no hidden dotfiles except "."
[[ "$(whoami)" = "root" ]] && return
[[ -z "$FUNCNEST" ]] && export FUNCNEST=100 # limits recursive functions, see 'man bash'
## Use the up and down arrow keys for finding a command in history
## (you can write some initial letters of the command first).
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
################################################################################
## Some generally useful functions.
## Consider uncommenting aliases below to start using these functions.
_GeneralCmdCheck() {
# A helper for functions UpdateArchPackages and UpdateAURPackages.
echo "$@" >&2
"$@" || {
echo "Error: '$*' failed." >&2
exit 1
}
}
_CheckInternetConnection() {
# curl --silent --connect-timeout 8 https://8.8.8.8 >/dev/null
eos-connection-checker
local result=$?
test $result -eq 0 || echo "No internet connection!" >&2
return $result
}
_CheckArchNews() {
local conf=/etc/eos-update-notifier.conf
if [ -z "$CheckArchNewsForYou" ] && [ -r $conf ] ; then
source $conf
fi
if [ "$CheckArchNewsForYou" = "yes" ] ; then
local news="$(yay -Pw)"
if [ -n "$news" ] ; then
echo "Arch news:" >&2
echo "$news" >&2
echo "" >&2
# read -p "Press ENTER to continue (or Ctrl-C to stop): "
else
echo "No Arch news." >&2
fi
fi
}
UpdateArchPackages() {
# Updates Arch packages.
_CheckInternetConnection || return 1
_CheckArchNews
#local updates="$(yay -Qu --repo)"
local updates="$(checkupdates)"
if [ -n "$updates" ] ; then
echo "Updates from upstream:" >&2
echo "$updates" | sed 's|^| |' >&2
_GeneralCmdCheck sudo pacman -Syu "$@"
return 0
else
echo "No upstream updates." >&2
return 1
fi
}
UpdateAURPackages() {
# Updates AUR packages.
_CheckInternetConnection || return 1
local updates
if [ -x /usr/bin/yay ] ; then
updates="$(yay -Qua)"
if [ -n "$updates" ] ; then
echo "Updates from AUR:" >&2
echo "$updates" | sed 's|^| |' >&2
_GeneralCmdCheck yay -Syua "$@"
else
echo "No AUR updates." >&2
fi
else
echo "Warning: /usr/bin/yay does not exist." >&2
fi
}
UpdateAllPackages() {
# Updates all packages in the system.
# Upstream (i.e. Arch) packages are updated first.
# If there are Arch updates, you should run
# this function a second time to update
# the AUR packages too.
UpdateArchPackages || UpdateAURPackages
}
_open_files_for_editing() {
# Open any given document file(s) for editing (or just viewing).
# Note1: Do not use for executable files!
# Note2: uses mime bindings, so you may need to use
# e.g. a file manager to make some file bindings.
local progs="xdg-open exo-open" # One of these programs is used.
local prog
for prog in $progs ; do
if [ -x /usr/bin/$xx ] ; then
$prog "$@" >& /dev/null &
return
fi
done
echo "Sorry, none of programs [$progs] is found." >&2
echo "Tip: install one of packages" >&2
for prog in $progs ; do
echo " $(pacman -Qqo "$prog")" >&2
done
}
#------------------------------------------------------------
## Aliases for the functions above.
## Uncomment an alias if you want to use it.
##
# alias ef='_open_files_for_editing' # 'ef' opens given file(s) for editing
################################################################################
source "$HOME/.cargo/env"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
. "$HOME/.cargo/env"

16
dotfiles/beets.yaml Normal file
View file

@ -0,0 +1,16 @@
directory: ~/Music/dj/Library
library: ~/Music/dj/library.db
plugins: spotify acousticbrainz badfiles duplicates fetchart
import:
write: yes
copy: yes
resume: no
duplicate_action: ask
default_action: apply
badfiles:
check_on_import: yes
match:
max_rec:
track_length: strong
track_title: strong
track_artist: strong

View file

@ -0,0 +1,7 @@
--force-dark-mode
--enable-features=WebUIDarkMode
--enable-smooth-scrolling
--ozone-platform-hint=auto
--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy

28
dotfiles/gitconfig Normal file
View file

@ -0,0 +1,28 @@
[user]
name = Thilo Billerbeck
email = thilo.billerbeck@officerent.de
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[log]
date = short
[rerere]
enabled = 1
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore-rab
autocrlf = input
[apply]
whitespace = nowarn
[branch]
autosetuprebase = always
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true

2
dotfiles/gtk-3.ini Normal file
View file

@ -0,0 +1,2 @@
[Settings]
gtk-application-prefer-dark-theme=true

39
dotfiles/htoprc Normal file
View file

@ -0,0 +1,39 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
tree_sort_key=0
tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=1
tree_view_always_by_pid=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=0
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
left_meters=LeftCPUs2 CPU Memory DiskIO NetworkIO
left_meter_modes=1 1 1 2 2
right_meters=RightCPUs2 Tasks LoadAverage Uptime Battery
right_meter_modes=1 2 2 2 2
hide_function_bar=0

43
dotfiles/init.vim Normal file
View file

@ -0,0 +1,43 @@
call plug#begin('~/.vim/plugged')
" FILE VIEW
Plug 'scrooloose/nerdtree'
Plug 'ryanoasis/vim-devicons'
" COC
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'dense-analysis/ale'
call plug#end()
" GENERAL
set title
set number
set relativenumber
set cursorline
"
set mouse=a
" THEMES
syntax enable
" FILE VIEW
let g:NERDTreeShowHidden = 1
let g:NERDTreeMinimalUI = 1
let g:NERDTreeIgnore = [ '.git/' ]
let g:NERDTreeStatusline = ''
let g:NERDTreeMouseMode = 2
" Automaticaly close nvim if NERDTree is only thing left open
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Toggle
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
" COC
let g:coc_global_extensions = ['coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-prettier', 'coc-tsserver']

6
dotfiles/install Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
script_location=$(dirname $(realpath $0))
bash $script_location/scripts/bootstrap-local-env.sh
bash $script_location/scripts/update-dotfiles.sh

View file

@ -0,0 +1,75 @@
- defaults:
link:
relink: true
- clean:
~/:
force: true
- link:
~/.bash_profile:
path: bash_profile
force: true
~/.bashrc:
path: bashrc
force: true
~/.bash_logout:
path: bash_logout
force: true
~/.zshrc:
path: zshrc
force: true
~/.zshenv:
path: zshenv
force: true
~/.gitconfig:
path: gitconfig
force: true
# ~/.config/gtk-3.0/settings.ini:
# path: gtk-3.ini
# force: true
~/.config/nano/nanorc:
path: nanorc
force: true
~/.config/locale.conf:
path: locale.conf
force: true
~/.aliases:
path: aliases
force: true
~/.alacritty.yml:
path: alacritty.yml
force: true
~/.config/htop/htoprc:
path: htoprc
force: true
~/.config/starship.toml:
path: starship.toml
force: true
~/.config/nvim/init.vim:
path: init.vim
force: true
~/.config/chromium-flags.conf:
path: chromium-flags.conf
force: true
~/.config/chrome-flags.conf:
path: chromium-flags.conf
force: true
~/.config/vivaldi-stable.conf:
path: chromium-flags.conf
force: true
~/.var/app/com.google.Chrome/config/chrome-flags.conf:
path: chromium-flags.conf
force: true
~/.ssh/config:
path: ssh-config
force: true
~/.config/beets/config.yaml:
path: beets.yaml
force: true
~/.config/pipewire/pipewire.conf:
path: pipewire.conf
force: true
~/.config/topgrade.toml:
path: topgrade.toml
force: true

10
dotfiles/locale.conf Normal file
View file

@ -0,0 +1,10 @@
LANG=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_PAPER=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_TIME=de_DE.UTF-8

305
dotfiles/nanorc Normal file
View file

@ -0,0 +1,305 @@
## Test comment
## Sample initialization file for GNU nano.
##
## For the options that take parameters, the default value is shown.
## Other options are unset by default. To make sure that an option
## is disabled, you can use "unset <option>".
##
## Characters that are special in a shell should not be escaped here.
## Inside string parameters, quotes should not be escaped -- the last
## double quote on the line will be seen as the closing quote.
## Make 'nextword' (Ctrl+Right) and 'chopwordright' (Ctrl+Delete)
## stop at word ends instead of at beginnings.
# set afterends
## When soft line wrapping is enabled, make it wrap lines at blanks
## (tabs and spaces) instead of always at the edge of the screen.
# set atblanks
## Automatically indent a newly created line to the same number of
## tabs and/or spaces as the preceding line -- or as the next line
## if the preceding line is the beginning of a paragraph.
# set autoindent
## Back up files to the current filename plus a tilde.
# set backup
## The directory to put unique backup files in.
# set backupdir ""
## Use bold text instead of reverse video text.
# set boldtext
## Treat any line with leading whitespace as the beginning of a paragraph.
# set bookstyle
## The characters treated as closing brackets when justifying paragraphs.
## This may not include any blank characters. Only closing punctuation,
## optionally followed by these closing brackets, can end sentences.
# set brackets ""')>]}"
## Automatically hard-wrap the current line when it becomes overlong.
# set breaklonglines
## Do case-sensitive searches by default.
# set casesensitive
## Constantly display the cursor position in the status bar. Note that
## this overrides "quickblank".
# set constantshow
## Use cut-from-cursor-to-end-of-line by default.
# set cutfromcursor
## Do not use the line below the title bar, leaving it entirely blank.
# set emptyline
## Set the target width for automatic hard-wrapping and for justifying
## paragraphs. If the specified value is 0 or less, the wrapping point
## will be the terminal's width minus this number.
# set fill -8
## Remember the used search/replace strings for the next session.
# set historylog
## Display a "scrollbar" on the righthand side of the edit window.
# set indicator
## Scroll the buffer contents per half-screen instead of per line.
# set jumpyscrolling
## Display line numbers to the left (and any anchors in the margin).
set linenumbers
## Enable vim-style lock-files. This is just to let a vim user know you
## are editing a file [s]he is trying to edit and vice versa. There are
## no plans to implement vim-style undo state in these files.
# set locking
## Fall back to slow libmagic to try and determine an applicable syntax.
# set magic
# After a search, set the mark at the end of the found match (if any).
# set markmatch
## The opening and closing brackets that can be found by bracket
## searches. They cannot contain blank characters. The former set must
## come before the latter set, and both must be in the same order.
# set matchbrackets "(<[{)>]}"
## Suppress title bar and show file name and editor state at the bottom.
# set minibar
## Enable mouse support, if available for your system. When enabled,
## mouse clicks can be used to place the cursor, set the mark (with a
## double click), and execute shortcuts. The mouse will work in the X
## Window System, and on the console when gpm is running.
# set mouse
## Switch on multiple file buffers (inserting a file will put it into
## a separate buffer).
# set multibuffer
## Don't convert files from DOS/Mac format.
# set noconvert
## Don't display the helpful shortcut lists at the bottom of the screen.
# set nohelp
## Don't automatically add a newline when a file does not end with one.
# set nonewlines
## Set operating directory. nano will not read or write files outside
## this directory and its subdirectories. Also, the current directory
## is changed to here, so any files are inserted from this dir. A blank
## string means the operating-directory feature is turned off.
# set operatingdir ""
## Remember the cursor position in each file for the next editing session.
# set positionlog
## Preserve the XON and XOFF keys (^Q and ^S).
# set preserve
## The characters treated as closing punctuation when justifying
## paragraphs. They cannot contain blank characters. Only closing
## punctuation, optionally followed by closing brackets, can end
## sentences.
# set punct "!.?"
## Do quick status-bar blanking. Status-bar messages will disappear after
## 1 keystroke instead of 26. Note that "constantshow" overrides this.
# set quickblank
## The regular expression that matches quoting characters in email
## or line-comment introducers in source code. The default is:
# set quotestr "^([ ]*([!#%:;>|}]|//))+"
## Try to work around a mismatching terminfo terminal description.
# set rawsequences
## Fix Backspace/Delete confusion problem.
# set rebinddelete
## Do regular-expression searches by default.
## Regular expressions are of the extended type (ERE).
# set regexp
## Save a changed buffer automatically on exit; don't prompt.
# set saveonexit
## (The old form of this option, 'set tempfile', is deprecated.)
## Put the cursor on the highlighted item in the file browser, and show
## the cursor in the help viewer; useful for people who use a braille
## display and people with poor vision.
# set showcursor
## Make the Home key smarter. When Home is pressed anywhere but at the
## very beginning of non-whitespace characters on a line, the cursor
## will jump to that beginning (either forwards or backwards). If the
## cursor is already at that position, it will jump to the true
## beginning of the line.
# set smarthome
## Spread overlong lines over multiple screen lines.
# set softwrap
## Use this spelling checker instead of the internal one. This option
## does not have a default value.
# set speller "aspell -x -c"
## Use the end of the title bar for some state flags: I = auto-indenting,
## M = mark, L = hard-wrapping long lines, R = recording, S = soft-wrapping.
# set stateflags
## Allow nano to be suspended (with ^Z by default).
# set suspendable
## (The old form of this option, 'set suspend', is deprecated.)
## Use this tab size instead of the default; it must be greater than 0.
# set tabsize 8
## Convert typed tabs to spaces.
# set tabstospaces
## Snip whitespace at the end of lines when justifying or hard-wrapping.
# set trimblanks
## The two single-column characters used to display the first characters
## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
## The default when in a UTF-8 locale:
# set whitespace "»·"
## The default otherwise:
# set whitespace ">."
## Detect word boundaries differently by treating punctuation
## characters as parts of words.
# set wordbounds
## The characters (besides alphanumeric ones) that should be considered
## as parts of words. This option does not have a default value. When
## set, it overrides option 'set wordbounds'.
# set wordchars "<_>."
## Let an unmodified Backspace or Delete erase the marked region (instead
## of a single character, and without affecting the cutbuffer).
# set zap
## Paint the interface elements of nano. These are examples;
## by default there are no colors, except for errorcolor.
# set titlecolor bold,lightwhite,blue
# set promptcolor lightwhite,lightblack
# set statuscolor bold,lightwhite,green
# set errorcolor bold,lightwhite,red
# set selectedcolor lightwhite,magenta
# set stripecolor ,yellow
# set scrollercolor cyan
# set numbercolor cyan
# set keycolor cyan
# set functioncolor green
## In root's .nanorc you might want to use:
# set titlecolor bold,lightwhite,magenta
# set promptcolor black,yellow
# set statuscolor bold,lightwhite,magenta
# set errorcolor bold,lightwhite,red
# set selectedcolor lightwhite,cyan
# set stripecolor ,yellow
# set scrollercolor magenta
# set numbercolor magenta
# set keycolor lightmagenta
# set functioncolor magenta
## === Syntax coloring ===
## For all details, see 'man nanorc', section SYNTAX HIGHLIGHTING.
## To include most of the existing syntax definitions, you can do:
include "/usr/share/nano/*.nanorc"
## Or you can select just the ones you need. For example:
# include "/usr/share/nano/html.nanorc"
# include "/usr/share/nano/python.nanorc"
# include "/usr/share/nano/sh.nanorc"
## In /usr/share/nano/extra/ you can find some syntaxes that are
## specific for certain distros or for some less common languages.
## If <Tab> should always produce four spaces when editing a Python file,
## independent of the settings of 'tabsize' and 'tabstospaces':
# extendsyntax python tabgives " "
## If <Tab> should always produce an actual TAB when editing a Makefile:
# extendsyntax makefile tabgives " "
## === Key bindings ===
## For all details, see 'man nanorc', section REBINDING KEYS.
## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor.
## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is
## the ASCII character for backspace, so it is bound by default to the
## backspace function. The <Backspace> key itself produces a different
## keycode, which is hard-bound to the backspace function. So, if you
## normally use <Backspace> for backspacing and not ^H, you can make
## <Ctrl+Backspace> delete the word to the left of the cursor with:
# bind ^H chopwordleft main
## If you would like nano to have keybindings that are more "usual",
## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,
## then uncomment these:
#bind ^Q exit all
#bind ^S savefile main
#bind ^W writeout main
#bind ^O insert main
#bind ^H help all
#bind ^H exit help
#bind ^F whereis all
#bind ^G findnext all
#bind ^B wherewas all
#bind ^D findprevious all
#bind ^R replace main
#bind M-X flipnewbuffer all
#bind ^X cut all
#bind ^C copy main
#bind ^V paste all
#bind ^P location main
#bind ^A mark main
#unbind ^K main
#unbind ^U all
#unbind ^N main
#unbind ^Y all
#unbind M-J main
#unbind M-T main
#bind ^T gotoline main
#bind ^T gotodir browser
#bind ^Y speller main
#bind M-U undo main
#bind M-R redo main
#bind ^U undo main
#bind ^E redo main
#set multibuffer

355
dotfiles/pipewire.conf Normal file
View file

@ -0,0 +1,355 @@
# Daemon config file for PipeWire version "0.3.42" #
#
# Copy and edit this file in /etc/pipewire for system-wide changes
# or in ~/.config/pipewire for local changes.
context.properties = {
## Configure properties in the system.
#library.name.system = support/libspa-support
#context.data-loop.library.name.system = support/libspa-support
#support.dbus = true
#link.max-buffers = 64
link.max-buffers = 16 # version < 3 clients can't handle more
#mem.warn-mlock = false
#mem.allow-mlock = true
#mem.mlock-all = false
#clock.power-of-two-quantum = true
#log.level = 2
#cpu.zero.denormals = true
core.daemon = true # listening for socket connections
core.name = pipewire-0 # core name and socket name
## Properties for the DSP configuration.
#default.clock.rate = 48000
#default.clock.allowed-rates = [ 48000 ]
#default.clock.quantum = 1024
#default.clock.min-quantum = 32
#defau lt.clock.max-quantum = 8192
#default.video.width = 640
#default.video.height = 480
#default.video.rate.num = 25
#default.video.rate.denom = 1
#
# These overrides are only applied when running in a vm.
vm.overrides = {
default.clock.min-quantum = 1024
}
}
context.spa-libs = {
#<factory-name regex> = <library-name>
#
# Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
audio.convert.* = audioconvert/libspa-audioconvert
api.alsa.* = alsa/libspa-alsa
api.v4l2.* = v4l2/libspa-v4l2
api.libcamera.* = libcamera/libspa-libcamera
api.bluez5.* = bluez5/libspa-bluez5
api.vulkan.* = vulkan/libspa-vulkan
api.jack.* = jack/libspa-jack
support.* = support/libspa-support
#videotestsrc = videotestsrc/libspa-videotestsrc
#audiotestsrc = audiotestsrc/libspa-audiotestsrc
}
context.modules = [
#{ name = <module-name>
# [ args = { <key> = <value> ... } ]
# [ flags = [ [ ifexists ] [ nofail ] ]
#}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignored when it is not found.
# If nofail is given, module initialization failures are ignored.
#
# Uses RTKit to boost the data thread priority.
{ name = libpipewire-module-rtkit
args = {
#nice.level = -11
#rt.prio = 88
#rt.time.soft = 2000000
#rt.time.hard = 2000000
}
flags = [ ifexists nofail ]
}
# Set thread priorities without using RTKit.
#{ name = libpipewire-module-rt
# args = {
# nice.level = -11
# rt.prio = 88
# rt.time.soft = 2000000
# rt.time.hard = 2000000
# }
# flags = [ ifexists nofail ]
#}
# The native communication protocol.
{ name = libpipewire-module-protocol-native }
# The profile module. Allows application to access profiler
# and performance data. It provides an interface that is used
# by pw-top and pw-profiler.
{ name = libpipewire-module-profiler }
# Allows applications to create metadata objects. It creates
# a factory for Metadata objects.
{ name = libpipewire-module-metadata }
# Creates a factory for making devices that run in the
# context of the PipeWire server.
{ name = libpipewire-module-spa-device-factory }
# Creates a factory for making nodes that run in the
# context of the PipeWire server.
{ name = libpipewire-module-spa-node-factory }
# Allows creating nodes that run in the context of the
# client. Is used by all clients that want to provide
# data to PipeWire.
{ name = libpipewire-module-client-node }
# Allows creating devices that run in the context of the
# client. Is used by the session manager.
{ name = libpipewire-module-client-device }
# The portal module monitors the PID of the portal process
# and tags connections with the same PID as portal
# connections.
{ name = libpipewire-module-portal
flags = [ ifexists nofail ]
}
# The access module can perform access checks and block
# new clients.
{ name = libpipewire-module-access
args = {
# access.allowed to list an array of paths of allowed
# apps.
#access.allowed = [
# /usr/bin/pipewire-media-session
#]
# An array of rejected paths.
#access.rejected = [ ]
# An array of paths with restricted access.
#access.restricted = [ ]
# Anything not in the above lists gets assigned the
# access.force permission.
#access.force = flatpak
}
}
# Makes a factory for wrapping nodes in an adapter with a
# converter and resampler.
{ name = libpipewire-module-adapter }
# Makes a factory for creating links between ports.
{ name = libpipewire-module-link-factory }
# Provides factories to make session manager objects.
{ name = libpipewire-module-session-manager }
{
name = libpipewire-module-loopback
args = {
node.name = "OBS"
node.description = "OBS"
capture.props = {
media.class = "Audio/Sink"
audio.position = [ FL FR ]
}
playback.props = {
audio.position = [ FL FR ]
node.target = "alsa_output.usb-MOTU_M4_M4AE167AEJ-00.analog-surround-40"
stream.dont-remix = true
node.passive = true
}
}
}
{
name = libpipewire-module-loopback
args = {
node.name = "M4 Stereo (1&2) -- Monitor & Headphones"
node.description = "M4 Stereo (1&2) -- Monitor & Headphones"
capture.props = {
media.class = "Audio/Sink"
audio.position = [ FL FR ]
}
playback.props = {
audio.position = [ FL FR ]
node.target = "alsa_output.usb-MOTU_M4_M4AE167AEJ-00.analog-surround-40"
stream.dont-remix = true
node.passive = true
}
}
}
{
name = libpipewire-module-loopback
args = {
node.name = "M4 Stereo (3&4) -- Line Out"
node.description = "M4 Stereo (3&4) -- Line Out"
capture.props = {
media.class = "Audio/Sink"
audio.position = [ FL FR ]
}
playback.props = {
audio.position = [ RR RL ]
node.target = "alsa_output.usb-MOTU_M4_M4AE167AEJ-00.analog-surround-40"
stream.dont-remix = true
node.passive = true
}
}
}
{
name = libpipewire-module-loopback
args = {
node.name = "M4 Input 1"
node.description = "M4 Input 1"
capture.props = {
audio.position = [ FL ]
stream.dont-remix = true
node.target = "alsa_input.usb-MOTU_M4_M4AE167AEJ-00.analog-surround-40"
node.passive = true
}
playback.props = {
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
{
name = libpipewire-module-loopback
args = {
node.name = "M4 Input 2"
node.description = "M4 Input 2"
capture.props = {
audio.position = [ FR ]
stream.dont-remix = true
node.target = "alsa_input.usb-MOTU_M4_M4AE167AEJ-00.analog-surround-40"
node.passive = true
}
playback.props = {
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
{
name = libpipewire-module-loopback
args = {
node.name = "M4 Input (3&4) -- Line In"
node.description = "M4 Input (3&4) -- Line In"
capture.props = {
audio.position = [ RL RR ]
stream.dont-remix = true
node.target = "alsa_input.usb-MOTU_M4_M4AE167AEJ-00.analog-surround-40"
node.passive = true
}
playback.props = {
media.class = "Audio/Source"
audio.position = [ FL FR ]
}
}
}
]
context.objects = [
#{ factory = <factory-name>
# [ args = { <key> = <value> ... } ]
# [ flags = [ [ nofail ] ]
#}
#
# Creates an object from a PipeWire factory with the given parameters.
# If nofail is given, errors are ignored (and no object is created).
#
#{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } }
#{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
#{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
#{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
#{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } }
#{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
# A default dummy driver. This handles nodes marked with the "node.always-driver"
# property when no other driver is currently active. JACK clients need this.
{ factory = spa-node-factory
args = {
factory.name = support.node.driver
node.name = Dummy-Driver
node.group = pipewire.dummy
priority.driver = 20000
}
}
{ factory = spa-node-factory
args = {
factory.name = support.node.driver
node.name = Freewheel-Driver
priority.driver = 19000
node.group = pipewire.freewheel
node.freewheel = true
}
}
# This creates a new Source node. It will have input ports
# that you can link, to provide audio for this source.
#{ factory = adapter
# args = {
# factory.name = support.null-audio-sink
# node.name = "my-mic"
# node.description = "Microphone"
# media.class = "Audio/Source/Virtual"
# audio.position = "FL,FR"
# }
#}
# This creates a single PCM source device for the given
# alsa device path hw:0. You can change source to sink
# to make a sink in the same way.
#{ factory = adapter
# args = {
# factory.name = api.alsa.pcm.source
# node.name = "alsa-source"
# node.description = "PCM Source"
# media.class = "Audio/Source"
# api.alsa.path = "hw:0"
# api.alsa.period-size = 1024
# api.alsa.headroom = 0
# api.alsa.disable-mmap = false
# api.alsa.disable-batch = false
# audio.format = "S16LE"
# audio.rate = 48000
# audio.channels = 2
# audio.position = "FL,FR"
# }
#}
]
context.exec = [
#{ path = <program-name> [ args = "<arguments>" ] }
#
# Execute the given program with arguments.
#
# You can optionally start the session manager here,
# but it is better to start it as a systemd service.
# Run the session manager with -h for options.
#
#{ path = "/usr/bin/pipewire-media-session" args = "" }
#
# You can optionally start the pulseaudio-server here as well
# but it is better to start it as a systemd service.
# It can be interesting to start another daemon here that listens
# on another address with the -a option (eg. -a tcp:4713).
#
#{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }
]

94
dotfiles/ssh-config Normal file
View file

@ -0,0 +1,94 @@
Host db2
HostName tg.dm.informatik.tu-darmstadt.de
Port 9022
User tbillerbeck
Host *
ForwardAgent no
ForwardX11 no
ForwardX11Trusted yes
User thilo
Port 22
ServerAliveInterval 60
ServerAliveCountMax 30
Host 158.101.179.53
IdentityFile ~/.ssh/id_thilo-billerbeck-com
Host burns matrix
HostName burns.thilo-billerbeck.com
Host lisa bart burns homer marge
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_github-com
IdentitiesOnly yes
Host *.thilo-billerbeck.com
User root
IdentityFile ~/.ssh/id_thilo-billerbeck-com
Host krusty.thilo-billerbeck.com
User opc
AddressFamily inet
Host skinner.thilo-billerbeck.com
User opc
Host 130.61.97.198
User opc
IdentityFile ~/.ssh/id_thilo-billerbeck-com
Host avocadoom.de
User thilo
IdentityFile ~/.ssh/id_thilo-billerbeck-com
Host *.avocadoom.de
User thilo
IdentityFile ~/.ssh/id_thilo-billerbeck-com
Host *.officerent.de
User thilo
IdentityFile ~/.ssh/id_thilo-billerbeck-com
Host mail
HostName mail.officerent.de
Host *.tu-darmstadt.de
IdentityFile ~/.ssh/id_tu-darmstadt-de
Host *.rwth-aachen.de
IdentityFile ~/.ssh/id_tu-darmstadt-de
Host *.tobias-neidig.de
IdentityFile ~/.ssh/id_tobias-neidig-de
Host *.darmstadt.ccc.de
IdentityFile ~/.ssh/id_darmstadt-ccc-de
Host ssh.dev.azure.com
IdentityFile ~/.ssh/id_azure-com
IdentitiesOnly yes
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
Host 192.168.50.54
User thilo
IdentityFile ~/.ssh/id_avocadoom-laptop
Host *.tailscale.net
User thilo
IdentityFile ~/.ssh/id_tailscale
Host digitaltwinservice.de
User tb12zysu
IdentityFile ~/.ssh/id_digitaltwinservice-de
Host thilo-pc
HostName thilo-pc.thilobillerbeck.github.beta.tailscale.net
Host *.relaix.net
User tbillerbeck
IdentityFile ~/.ssh/id_relaix-net

22
dotfiles/starship.toml Normal file
View file

@ -0,0 +1,22 @@
# Don't print a new line at the start of the prompt
add_newline = false
# Which is equivalent to
format = """
$all\
$line_break\
$jobs\
$battery\
$time\
$status\
$shell\
$character"""
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[](bold white)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
disabled = true

131
dotfiles/topgrade.toml Normal file
View file

@ -0,0 +1,131 @@
# Don't ask for confirmations
assume_yes = true
# Disable specific steps - same options as the command line flag
#disable = ["system", "emacs"]
# Ignore failures for these steps
ignore_failures = ["git_repos"]
# Run specific steps - same options as the command line flag
#only = ["system", "emacs"]
# Do not ask to retry failed steps (default: false)
no_retry = true
# Run `sudo -v` to cache credentials at the start of the run; this avoids a
# blocking password prompt in the middle of a possibly-unattended run.
pre_sudo = false
# Run inside tmux
#run_in_tmux = true
# List of remote machines with Topgrade installed on them
#remote_topgrades = ["toothless", "pi", "parnas"]
# Arguments to pass SSH when upgrading remote systems
#ssh_arguments = "-o ConnectTimeout=2"
# Path to Topgrade executable on remote machines
#remote_topgrade_path = ".cargo/bin/topgrade"
# Arguments to pass tmux when pulling Repositories
#tmux_arguments = "-S /var/tmux.sock"
# Do not set the terminal title
#set_title = false
# Display the time in step titles
# display_time = true
# Cleanup temporary or old files
cleanup = true
# Skip sending a notification at the end of a run
skip_notify = true
# Skip the preamble displayed when topgrade is run
#display_preamble = false
[git]
#max_concurrency = 5
# Additional git repositories to pull
#repos = [
# "~/src/*/",
# "~/.config/something"
#]
# Don't pull the predefined git repos
#pull_predefined = false
# Arguments to pass Git when pulling Repositories
#arguments = "--rebase --autostash"
[composer]
#self_update = true
# Commands to run before anything
[pre_commands]
#"Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak"
# Custom commands
[commands]
#"Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter"
"zinit" = "zinit update"
[brew]
#greedy_cask = true
#autoremove = true
[linux]
# Arch Package Manager to use. Allowed values: autodetect, aura, garuda_update, pacman, pamac, paru, pikaur, trizen, yay.
#arch_package_manager = "pacman"
# Arguments to pass yay (or paru) when updating packages
#yay_arguments = "--nodevel"
# Arguments to pass dnf when updating packages
#dnf_arguments = "--refresh"
#aura_aur_arguments = "-kx"
#aura_pacman_arguments = ""
#garuda_update_arguments = ""
#show_arch_news = true
#trizen_arguments = "--devel"
#pikaur_arguments = ""
#pamac_arguments = "--no-devel"
#enable_tlmgr = true
#emerge_sync_flags = "-q"
#emerge_update_flags = "-uDNa --with-bdeps=y world"
#redhat_distro_sync = false
#rpm_ostree = false
#nix_arguments = "--flake"
[python]
#enable_pip_review = true ###disabled by default
#enable_pipupgrade = true ###disabled by default
[windows]
# Manually select Windows updates
#accept_all_updates = false
#open_remotes_in_new_terminal = true
#wsl_update_pre_release = true
#wsl_update_use_web_download = true
# Causes Topgrade to rename itself during the run to allow package managers
# to upgrade it. Use this only if you installed Topgrade by using a package
# manager such as Scoop or Cargo
#self_rename = true
[npm]
# Use sudo if the NPM directory isn't owned by the current user
#use_sudo = true
[firmware]
# Offer to update firmware; if false just check for and display available updates
upgrade = true
[flatpak]
# Use sudo for updating the system-wide installation
#use_sudo = true
[distrobox]
#use_root = false
#containers = ["archlinux-latest"]

3
dotfiles/zshenv Normal file
View file

@ -0,0 +1,3 @@
source "$HOME/.cargo/env"
if [ -e /home/thilo/.nix-profile/etc/profile.d/nix.sh ]; then . /home/thilo/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
. "$HOME/.cargo/env"

82
dotfiles/zshrc Normal file
View file

@ -0,0 +1,82 @@
export PATH=$HOME/bin:$HOME/.local/bin:$HOME/.flutter/bin:$PATH
export TERM="xterm-256color"
export LANG=en_US.UTF-8
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
source $HOME/.aliases
### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zdharma-continuum/zinit-annex-as-monitor \
zdharma-continuum/zinit-annex-bin-gem-node \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-rust
### End of Zinit's installer chunk
zinit snippet OMZP::asdf
zinit snippet OMZP::git
# zinit snippet OMZP::asdf
zinit snippet OMZP::archlinux
zinit snippet OMZP::brew
zinit snippet OMZP::composer
zinit snippet OMZP::colored-man-pages
zinit snippet OMZP::extract
zinit snippet OMZP::gradle
zinit snippet OMZP::node
zinit snippet OMZP::npm
zinit snippet OMZP::nvm
zinit snippet OMZP::rbenv
zinit snippet OMZP::sudo
zinit snippet OMZP::direnv
zinit snippet OMZP::docker
zinit snippet OMZP::docker-compose
zinit snippet OMZP::golang
zinit snippet OMZP::pip
zinit snippet OMZP::history
zinit snippet OMZP::vagrant
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-syntax-highlighting
zinit light zkuzmic/which-jspm
zinit ice as"command" from"gh-r" \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh"
zinit light starship/starship
# eval "$(starship init zsh)"
# pnpm
export PNPM_HOME="/home/thilo/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
# bun completions
[ -s "/home/thilo/.bun/_bun" ] && source "/home/thilo/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
export DENO_INSTALL="/home/thilo/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"

221
home.nix Normal file
View file

@ -0,0 +1,221 @@
{ config, pkgs, lib, ... }:
let
chromeArgs = "--force-dark-mode --enable-features=WebUIDarkMode --enable-smooth-scrolling --ozone-platform-hint=auto --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy";
in {
nixpkgs.config.allowUnfree = true;
targets.genericLinux.enable = true;
home = {
username = "thilo";
homeDirectory = "/home/thilo";
stateVersion = "22.11";
packages = [
pkgs.up
pkgs.rbenv
pkgs.cargo-update
pkgs.htop
pkgs.rustup
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" "FiraMono" ]; })
(pkgs.vivaldi.override {
proprietaryCodecs = true;
enableWidevine = true;
commandLineArgs = chromeArgs;
})
(pkgs.google-chrome.override {
commandLineArgs = chromeArgs;
})
(pkgs.writeShellScriptBin "ssh-fix-permissions" ''
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
chmod 644 -f ~/.ssh/*.pub ~/.ssh/authorized_keys ~/.ssh/known_hosts
'')
];
file = {
".config/htop/htoprc".source = ./dotfiles/htoprc;
".config/nano/nanorc".source = ./dotfiles/nanorc;
".config/locale.conf".source = ./dotfiles/locale.conf;
".ssh/config".source = ./dotfiles/ssh-config;
".config/beets/config.yaml".source = ./dotfiles/beets.yaml;
};
sessionVariables = {
};
activation = {
linkDesktopApplications = {
after = [ "writeBoundary" "createXdgUserDirectories" ];
before = [ ];
data = ''
rm -rf ${config.xdg.dataHome}/"applications/home-manager"
mkdir -p ${config.xdg.dataHome}/"applications/home-manager"
cp -Lr ${config.home.homeDirectory}/.nix-profile/share/applications/* ${config.xdg.dataHome}/"applications/home-manager/"
'';
};
};
}
;
xdg = {
enable = true;
mime.enable = true;
};
programs = {
home-manager.enable = true;
vscode = {
enable = true;
package = pkgs.vscode.override { commandLineArgs = "--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --gtk-version=4"; };
};
zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
enableVteIntegration = true;
};
git = {
enable = true;
lfs.enable = true;
userEmail = "thilo.billerbeck@officerent.de";
userName = "Thilo Billerbeck";
extraConfig = {
color = {
diff = "auto";
status = "auto";
branch = "auto";
interactive = "auto";
ui = true;
pager = true;
};
log = {
date = "short";
};
rerere = {
enabled = "1";
};
core = {
whitespace="fix,-indent-with-non-tab,trailing-space,cr-at-eol";
excludesfile = "~/.gitignore-rab";
autocrlf = "input";
};
apply = {
whitespace = "nowarn";
};
branch = {
autosetuprebase = "always";
};
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
starship = {
enable = true;
settings = {
add_newline = false;
character = {
success_symbol = "[](bold white)";
};
package = {
disabled = true;
};
};
};
topgrade = {
enable = true;
settings = {
assume_yes = true;
ignore_failures = ["git_repos"];
no_retry = true;
pre_sudo = false;
cleanup = true;
skip_notify = true;
firmware = {
upgrade = true;
};
};
};
alacritty = {
enable = true;
settings = {
window = {
decorations = "full";
dynamic_title = true;
gtk_theme_variant = "None";
};
background_opacity = 1;
font = {
normal = {
family = "FiraMono Nerd Font";
style = "Regular";
};
bold = {
family = "FiraMono Nerd Font";
style = "Bold";
};
size = 14;
offset = {
x = 1;
};
};
cursor.style.shape = "Beam";
colors = {
primary = {
background = "0x282a36";
foreground = "0xeff0eb";
};
normal = {
black = "0x282a36";
red = "0xff5c57";
green = "0x5af78e";
yellow = "0xf3f99d";
blue = "0x57c7ff";
magenta = "0xff6ac1";
cyan = "0x9aedfe";
white = "0xf1f1f0";
};
bright = {
black = "0x686868";
red = "0xff5c57";
green = "0x5af78e";
yellow = "0xf3f99d";
blue = "0x57c7ff";
magenta = "0xff6ac1";
cyan = "0x9aedfe";
white = "0xf1f1f0";
};
};
};
};
neovim = {
defaultEditor = true;
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
coc = {
enable = true;
};
extraConfig = ''
set title
set number
set relativenumber
set cursorline
set mouse=a
syntax enable
let g:NERDTreeShowHidden = 1
let g:NERDTreeMinimalUI = 1
let g:NERDTreeIgnore = [ '.git/' ]
let g:NERDTreeStatusline = ""
let g:NERDTreeMouseMode = 2
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
'';
plugins = with pkgs.vimPlugins; [
nerdtree
vim-devicons
# fzf
ale
];
};
};
}