Merge previous flakes

This commit is contained in:
Patrick Neff 2024-04-08 16:13:03 +02:00
commit 0f0c007317
139 changed files with 6310 additions and 0 deletions

View File

@ -0,0 +1,29 @@
layout_postgres() {
PGHOST="$(direnv_layout_dir)/postgres"
export PGHOST
if [[ ! -d "$PGHOST" ]]; then
mkdir -p "$PGHOST"
fi
PGDATA="$PGHOST/data"
export PGDATA
if [[ ! -d "$PGDATA" ]]; then
initdb
cat >>"$PGDATA/postgresql.conf" <<-EOF
listen_addresses = ''
unix_socket_directories = '$PGHOST'
EOF
fi
}
layout_symfony() {
PATH_add bin
}
layout_python() {
PYTHONPATH_add src
}
# vim: ft=sh

View File

@ -0,0 +1,174 @@
# vim:ft=dircolors
# (This is not a dircolors file but it helps to highlight colors and comments)
# default values from dircolors
# (entries with a leading # are not implemented in lf)
# #no 00 # NORMAL
# fi 00 # FILE
# #rs 0 # RESET
# di 01;34 # DIR
# ln 01;36 # LINK
# #mh 00 # MULTIHARDLINK
# pi 40;33 # FIFO
# so 01;35 # SOCK
# #do 01;35 # DOOR
# bd 40;33;01 # BLK
# cd 40;33;01 # CHR
# or 40;31;01 # ORPHAN
# #mi 00 # MISSING
# su 37;41 # SETUID
# sg 30;43 # SETGID
# #ca 30;41 # CAPABILITY
# tw 30;42 # STICKY_OTHER_WRITABLE
# ow 34;42 # OTHER_WRITABLE
# st 37;44 # STICKY
# ex 01;32 # EXEC
# default values from lf (with matching order)
# ln 01;36 # LINK
# or 31;01 # ORPHAN
# tw 01;34 # STICKY_OTHER_WRITABLE
# ow 01;34 # OTHER_WRITABLE
# st 01;34 # STICKY
# di 01;34 # DIR
# pi 33 # FIFO
# so 01;35 # SOCK
# bd 33;01 # BLK
# cd 33;01 # CHR
# su 01;32 # SETUID
# sg 01;32 # SETGID
# ex 01;32 # EXEC
# fi 00 # FILE
# file types (with matching order)
ln 01;36 # LINK
or 31;01 # ORPHAN
tw 34 # STICKY_OTHER_WRITABLE
ow 34 # OTHER_WRITABLE
st 01;34 # STICKY
di 01;34 # DIR
pi 33 # FIFO
so 01;35 # SOCK
bd 33;01 # BLK
cd 33;01 # CHR
su 01;32 # SETUID
sg 01;32 # SETGID
ex 01;32 # EXEC
fi 00 # FILE
# archives or compressed (dircolors defaults)
*.tar 01;31
*.tgz 01;31
*.arc 01;31
*.arj 01;31
*.taz 01;31
*.lha 01;31
*.lz4 01;31
*.lzh 01;31
*.lzma 01;31
*.tlz 01;31
*.txz 01;31
*.tzo 01;31
*.t7z 01;31
*.zip 01;31
*.z 01;31
*.dz 01;31
*.gz 01;31
*.lrz 01;31
*.lz 01;31
*.lzo 01;31
*.xz 01;31
*.zst 01;31
*.tzst 01;31
*.bz2 01;31
*.bz 01;31
*.tbz 01;31
*.tbz2 01;31
*.tz 01;31
*.deb 01;31
*.rpm 01;31
*.jar 01;31
*.war 01;31
*.ear 01;31
*.sar 01;31
*.rar 01;31
*.alz 01;31
*.ace 01;31
*.zoo 01;31
*.cpio 01;31
*.7z 01;31
*.rz 01;31
*.cab 01;31
*.wim 01;31
*.swm 01;31
*.dwm 01;31
*.esd 01;31
# image formats (dircolors defaults)
*.jpg 01;35
*.jpeg 01;35
*.mjpg 01;35
*.mjpeg 01;35
*.gif 01;35
*.bmp 01;35
*.pbm 01;35
*.pgm 01;35
*.ppm 01;35
*.tga 01;35
*.xbm 01;35
*.xpm 01;35
*.tif 01;35
*.tiff 01;35
*.png 01;35
*.svg 01;35
*.svgz 01;35
*.mng 01;35
*.pcx 01;35
*.mov 01;35
*.mpg 01;35
*.mpeg 01;35
*.m2v 01;35
*.mkv 01;35
*.webm 01;35
*.ogm 01;35
*.mp4 01;35
*.m4v 01;35
*.mp4v 01;35
*.vob 01;35
*.qt 01;35
*.nuv 01;35
*.wmv 01;35
*.asf 01;35
*.rm 01;35
*.rmvb 01;35
*.flc 01;35
*.avi 01;35
*.fli 01;35
*.flv 01;35
*.gl 01;35
*.dl 01;35
*.xcf 01;35
*.xwd 01;35
*.yuv 01;35
*.cgm 01;35
*.emf 01;35
*.ogv 01;35
*.ogx 01;35
# audio formats (dircolors defaults)
*.aac 00;36
*.au 00;36
*.flac 00;36
*.m4a 00;36
*.mid 00;36
*.midi 00;36
*.mka 00;36
*.mp3 00;36
*.mpc 00;36
*.ogg 00;36
*.ra 00;36
*.wav 00;36
*.oga 00;36
*.opus 00;36
*.spx 00;36
*.xspf 00;36

View File

@ -0,0 +1,357 @@
# vim:ft=conf
# These examples require Nerd Fonts or a compatible font to be used.
# See https://www.nerdfonts.com for more information.
# default values from lf (with matching order)
# ln l # LINK
# or l # ORPHAN
# tw t # STICKY_OTHER_WRITABLE
# ow d # OTHER_WRITABLE
# st t # STICKY
# di d # DIR
# pi p # FIFO
# so s # SOCK
# bd b # BLK
# cd c # CHR
# su u # SETUID
# sg g # SETGID
# ex x # EXEC
# fi - # FILE
# file types (with matching order)
ln  # LINK
or  # ORPHAN
tw t # STICKY_OTHER_WRITABLE
ow  # OTHER_WRITABLE
st t # STICKY
di  # DIR
pi p # FIFO
so s # SOCK
bd b # BLK
cd c # CHR
su u # SETUID
sg g # SETGID
ex  # EXEC
fi  # FILE
# file extensions (vim-devicons)
*.styl 
*.sass 
*.scss 
*.htm 
*.html 
*.slim 
*.haml 
*.ejs 
*.css 
*.less 
*.md 
*.mdx 
*.markdown 
*.rmd 
*.json 
*.webmanifest 
*.js 
*.mjs 
*.jsx 
*.rb 
*.gemspec 
*.rake 
*.php 
*.py 
*.pyc 
*.pyo 
*.pyd 
*.coffee 
*.mustache 
*.hbs 
*.conf 
*.ini 
*.yml 
*.yaml 
*.toml 
*.bat 
*.mk 
*.jpg 
*.jpeg 
*.bmp 
*.png 
*.webp 
*.gif 
*.ico 
*.twig 
*.cpp 
*.c++ 
*.cxx 
*.cc 
*.cp 
*.c 
*.cs 󰌛
*.h 
*.hh 
*.hpp 
*.hxx 
*.hs 
*.lhs 
*.nix 
*.lua 
*.java 
*.sh 
*.fish 
*.bash 
*.zsh 
*.ksh 
*.csh 
*.awk 
*.ps1 
*.ml λ
*.mli λ
*.diff 
*.db 
*.sql 
*.dump 
*.clj 
*.cljc 
*.cljs 
*.edn 
*.scala 
*.go 
*.dart 
*.xul 
*.sln 
*.suo 
*.pl 
*.pm 
*.t 
*.rss 
'*.f#' 
*.fsscript 
*.fsx 
*.fs 
*.fsi 
*.rs 
*.rlib 
*.d 
*.erl 
*.hrl 
*.ex 
*.exs 
*.eex 
*.leex 
*.heex 
*.vim 
*.ai 
*.psd 
*.psb 
*.ts 
*.tsx 
*.jl 
*.pp 
*.vue 
*.elm 
*.swift 
*.xcplayground 
*.tex 󰙩
*.r 󰟔
*.rproj 󰗆
*.sol 󰡪
*.pem 
# file names (vim-devicons) (case-insensitive not supported in lf)
*gruntfile.coffee 
*gruntfile.js 
*gruntfile.ls 
*gulpfile.coffee 
*gulpfile.js 
*gulpfile.ls 
*mix.lock 
*dropbox 
*.ds_store 
*.gitconfig 
*.gitignore 
*.gitattributes 
*.gitlab-ci.yml 
*.bashrc 
*.zshrc 
*.zshenv 
*.zprofile 
*.vimrc 
*.gvimrc 
*_vimrc 
*_gvimrc 
*.bashprofile 
*favicon.ico 
*license 
*node_modules 
*react.jsx 
*procfile 
*dockerfile 
*docker-compose.yml 
*rakefile 
*config.ru 
*gemfile 
*makefile 
*cmakelists.txt 
*robots.txt 󰚩
# file names (case-sensitive adaptations)
*Gruntfile.coffee 
*Gruntfile.js 
*Gruntfile.ls 
*Gulpfile.coffee 
*Gulpfile.js 
*Gulpfile.ls 
*Dropbox 
*.DS_Store 
*LICENSE 
*React.jsx 
*Procfile 
*Dockerfile 
*Docker-compose.yml 
*Rakefile 
*Gemfile 
*Makefile 
*CMakeLists.txt 
# file patterns (vim-devicons) (patterns not supported in lf)
# .*jquery.*\.js$ 
# .*angular.*\.js$ 
# .*backbone.*\.js$ 
# .*require.*\.js$ 
# .*materialize.*\.js$ 
# .*materialize.*\.css$ 
# .*mootools.*\.js$ 
# .*vimrc.* 
# Vagrantfile$ 
# file patterns (file name adaptations)
*jquery.min.js 
*angular.min.js 
*backbone.min.js 
*require.min.js 
*materialize.min.js 
*materialize.min.css 
*mootools.min.js 
*vimrc 
Vagrantfile 
# archives or compressed (extensions from dircolors defaults)
*.tar 
*.tgz 
*.arc 
*.arj 
*.taz 
*.lha 
*.lz4 
*.lzh 
*.lzma 
*.tlz 
*.txz 
*.tzo 
*.t7z 
*.zip 
*.z 
*.dz 
*.gz 
*.lrz 
*.lz 
*.lzo 
*.xz 
*.zst 
*.tzst 
*.bz2 
*.bz 
*.tbz 
*.tbz2 
*.tz 
*.deb 
*.rpm 
*.jar 
*.war 
*.ear 
*.sar 
*.rar 
*.alz 
*.ace 
*.zoo 
*.cpio 
*.7z 
*.rz 
*.cab 
*.wim 
*.swm 
*.dwm 
*.esd 
# image formats (extensions from dircolors defaults)
*.jpg 
*.jpeg 
*.mjpg 
*.mjpeg 
*.gif 
*.bmp 
*.pbm 
*.pgm 
*.ppm 
*.tga 
*.xbm 
*.xpm 
*.tif 
*.tiff 
*.png 
*.svg 
*.svgz 
*.mng 
*.pcx 
*.mov 
*.mpg 
*.mpeg 
*.m2v 
*.mkv 
*.webm 
*.ogm 
*.mp4 
*.m4v 
*.mp4v 
*.vob 
*.qt 
*.nuv 
*.wmv 
*.asf 
*.rm 
*.rmvb 
*.flc 
*.avi 
*.fli 
*.flv 
*.gl 
*.dl 
*.xcf 
*.xwd 
*.yuv 
*.cgm 
*.emf 
*.ogv 
*.ogx 
# audio formats (extensions from dircolors defaults)
*.aac 
*.au 
*.flac 
*.m4a 
*.mid 
*.midi 
*.mka 
*.mp3 
*.mpc 
*.ogg 
*.ra 
*.wav 
*.oga 
*.opus 
*.spx 
*.xspf 
# other formats
*.pdf 

View File

@ -0,0 +1,102 @@
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
zstyle ':completion:*' completer _extensions _complete _approximate
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'
zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
zstyle ':completion:*' file-list all
zstyle ':completion:complete:*' gain-privileges 1
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
zstyle ':completion:*:descriptions' format '[%d]'
zmodload zsh/complist
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -M menuselect 'l' vi-forward-char
typeset -g -A key
key[Home]="${terminfo[khome]}"
key[End]="${terminfo[kend]}"
key[Insert]="${terminfo[kich1]}"
key[Backspace]="${terminfo[kbs]}"
key[Delete]="${terminfo[kdch1]}"
key[Up]="${terminfo[kcuu1]}"
key[Down]="${terminfo[kcud1]}"
key[Left]="${terminfo[kcub1]}"
key[Right]="${terminfo[kcuf1]}"
key[PageUp]="${terminfo[kpp]}"
key[PageDown]="${terminfo[knp]}"
key[Shift-Tab]="${terminfo[kcbt]}"
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode
[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char
[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char
[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char
[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history
[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete
#[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
#[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" history-substring-search-up
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" history-substring-search-down
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
autoload -Uz add-zle-hook-widget
function zle_application_mode_start { echoti smkx }
function zle_application_mode_stop { echoti rmkx }
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
fi
_fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}
# Use fd to generate the list for directory completion
_fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
function gi() {
curl -sLw '\n' "https://www.toptal.com/developers/gitignore/api/$*"
}
_gitignoreio_get_command_list() {
curl -sL https://www.toptal.com/developers/gitignore/api/list | tr "," "\n"
}
_gitignoreio () {
compset -P '*,'
compadd -S '' "$(_gitignoreio_get_command_list)"
}
compdef _gitignoreio gi
compdef _symfony_complete symfony
compdef _symfony_complete composer
compdef _symfony_complete console
compdef _symfony_complete artisan
compdef _symfony_complete phpstan
compdef _symfony_complete php-cs-fixer
compdef _symfony_complete phpspec

647
flake.lock Normal file
View File

@ -0,0 +1,647 @@
{
"nodes": {
"base16-schemes": {
"flake": false,
"locked": {
"lastModified": 1696158499,
"narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=",
"owner": "tinted-theming",
"repo": "base16-schemes",
"rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-schemes",
"type": "github"
}
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1711099426,
"narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=",
"owner": "numtide",
"repo": "devshell",
"rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"hercules-ci-effects",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1710478346,
"narHash": "sha256-Xjf8BdnQG0tLhPMlqQdwCIjOp7Teox0DP3N/jjyiGM4=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "64e7763d72c1e4c1e5e6472640615b6ae2d40fbf",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1712462372,
"narHash": "sha256-WA3bbBWhd3o1wAgyHZNypjb/LG4oq+IWxFq8ey8yNPU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a561ad6ab38578c812cc9af3b04f2cc60ebf48c9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1711625603,
"narHash": "sha256-W+9dfqA9bqUIBV5u7jaIARAzMe3kTq/Hp2SpSVXKRQw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c0ef0dab55611c676ad7539bf4e41b3ec6fa87d2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"neovim-flake": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"dir": "contrib",
"lastModified": 1712529338,
"narHash": "sha256-5/E8yWlb6XiQcT8LIhf1IoMQvCsJ+YI3ydNdDteh+xU=",
"owner": "neovim",
"repo": "neovim",
"rev": "541c2d3816cdef9aba7f55f74908fa07d0cfa3ec",
"type": "github"
},
"original": {
"dir": "contrib",
"owner": "neovim",
"repo": "neovim",
"type": "github"
}
},
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-flake": "neovim-flake",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1712534643,
"narHash": "sha256-nOR2DxznyiBQ1sDxjIk8D5nrJhD/z+PwlBfc8YonSr4=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "4cb2a8580de0498dd38eb90791728547b5826331",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"type": "github"
}
},
"nix-colors": {
"inputs": {
"base16-schemes": "base16-schemes",
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1707825078,
"narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=",
"owner": "misterio77",
"repo": "nix-colors",
"rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1",
"type": "github"
},
"original": {
"owner": "misterio77",
"repo": "nix-colors",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1711763326,
"narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixgl": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1705794759,
"narHash": "sha256-jfyttJ23+WcGlW9zoBcQuUpXNCLEwZaygJClvtFTqWU=",
"owner": "nix-community",
"repo": "nixGL",
"rev": "9b4887dbf16933bdc124296434b3898d810b3608",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixGL",
"rev": "9b4887dbf16933bdc124296434b3898d810b3608",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1712439257,
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1697935651,
"narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_4",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1712517143,
"narHash": "sha256-fC+spgEJpRBvLzTLiqOVBhcIHVWZWqQfxAG1aM2calo=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "0d85838d204d0f3d1cda22059d3fed0cd757d0ab",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1712577859,
"narHash": "sha256-Dj/v0G964gStuJQ4AZlU/BXhfUbboCeegfPEGOM0x9c=",
"owner": "nix-community",
"repo": "NUR",
"rev": "47a8f374c33c567f9b0c63f6a953f38e3b6eb921",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_5",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1711760932,
"narHash": "sha256-DqUTQ2iAAqSDwMhKBqvi24v0Oc7pD3LCK/0FCG//TdA=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "c11e43aed6f17336c25cd120eac886b96c455731",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-colors": "nix-colors",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"nur": "nur",
"systems": "systems_4"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

138
flake.nix Normal file
View File

@ -0,0 +1,138 @@
{
description = "My Nix Configs";
outputs = {
self,
nixpkgs,
flake-utils,
...
}: let
inherit (self) inputs outputs;
flakeLib = import ./lib;
vars = rec {
name = "Patrick Neff";
username = "odie";
homeDirectory = "/home/${username}";
locale = "de_DE.UTF-8";
email = "odie86@gmail.com";
timeZone = "Europe/Berlin";
sshKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByWNNmKhjVk5VEjk3aSKosOXzglCbiq7q8IQ8mA0qQe odie"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1QZO6fF2RLcmjMKdG1eZi0RLw3joa+VBXaKvfmA7Tg odie"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINs89u4Kvwlmq67eV+H/n+x9M8gsKDxQU+dCPSEb2vJe odie"
];
domain = "odie.intranet";
};
in
{
nixosModules = {
base = import ./modules/nixos/base;
desktop = import ./modules/nixos/desktop;
wsl = import ./modules/nixos/wsl;
};
nixosConfigurations =
flakeLib.mkSystem {
inherit inputs nixpkgs vars;
system = "x86_64-linux";
hostName = "vm";
}
// flakeLib.mkSystem {
inherit inputs nixpkgs vars;
system = "x86_64-linux";
hostName = "wsl-dev";
}
// flakeLib.mkSystem {
inherit inputs nixpkgs vars;
system = "aarch64-linux";
hostName = "pi1";
}
// {};
homeManagerModules = {
base = import ./modules/home-manager/base.nix;
desktop = import ./modules/home-manager/desktop.nix;
shell = import ./modules/home-manager/shell.nix;
dev = import ./modules/home-manager/dev.nix;
};
homeConfigurations = {
"odie@wanaheim" = flakeLib.mkHomeConfiguration {
inherit inputs outputs nixpkgs flakeLib vars;
profile = ./profiles/home-manager/desktop-dev.nix;
system = "x86_64-linux";
modules = [
{
desktop = {
enable = true;
awesome = {
enable = true;
wifi_device = "'wlp3s0'";
battery_device = "'BAT0'";
};
};
services.picom.enable = false;
programs.rofi.enable = true;
}
];
};
"odie@asgard" = flakeLib.mkHomeConfiguration {
inherit inputs outputs nixpkgs flakeLib vars;
profile = ./profiles/home-manager/desktop-dev.nix;
system = "x86_64-linux";
modules = [
{
desktop = {
enable = true;
awesome = {
enable = false;
};
};
programs = {
firefox.enable = false;
keepassxc.enable = false;
};
services.nixGL.enable = true;
services.borgmatic.enable = true;
theme.cursor.enable = false;
theme.gtk.enable = false;
}
];
};
};
}
// flake-utils.lib.eachDefaultSystem (system: {
packages = {
neovim-ide = import ./pkgs/nixvim {inherit inputs system flakeLib nixpkgs;};
};
});
inputs = {
#nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
#nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
nix-colors.url = "github:misterio77/nix-colors";
systems.url = "github:nix-systems/default";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:nix-community/nixGL/9b4887dbf16933bdc124296434b3898d810b3608";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
};
}

View File

@ -0,0 +1,6 @@
{outputs, ...}: {
imports = [
./hardware-configuration.nix
outputs.nixosModules.base
];
}

View File

@ -0,0 +1,45 @@
{ lib, pkgs, ... }: {
boot = {
loader.grub.enable = false;
loader.generic-extlinux-compatible.enable = true;
kernelPackages = pkgs.linuxPackages_rpi4;
kernelParams = [ "snd_bcm2835.enable_headphones=1" "snd_bcm2835.enable_hdmi=1" ];
initrd.availableKernelModules = lib.mkDefault [
"vc4"
"bcm2835_dma"
"i2c_bcm2835"
"xhci_pci"
"usbhid"
"usb_storage"
];
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 4 * 1024;
}];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
hardware = {
raspberry-pi = {
enable = true;
cec.enable = true;
"4" = {
apply-overlays-dtmerge.enable = true;
fkms-3d.enable = true;
};
enableRedistributableFirmware = true;
};
};
system.stateVersion = "23.11";
nixpkgs.hostPlatform.system = "aarch64-linux";
}

View File

@ -0,0 +1,6 @@
{ inputs, ... }: {
imports = [
inputs.home-manager-flake.homeModules.base
inputs.home-manager-flake.homeModules.shell
];
}

View File

@ -0,0 +1,45 @@
{
nixpkgs,
vars,
outputs,
inputs,
flakeLib,
system,
profile,
modules ? [],
...
}: {
imports = [
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
outputs.nixosModules.base
outputs.nixosModules.wsl
outputs.nixosModules.desktop
];
networking = {
inherit (vars) hostName domain;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
user.${vars.userName} = flakeLib.mkHomeConfiguration {
inherit nixpkgs vars outputs inputs flakeLib system profile modules;
};
};
boot.loader.systemd-boot.enable = true;
desktop.enable = true;
desktop.awesome.enable = true;
services = {
openssh.enable = true;
qemuGuest.enable = true;
spice-vdagentd.enable = true;
spice-autorandr.enable = true;
};
system.stateVersion = "23.11";
}

View File

@ -0,0 +1,52 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/profiles/qemu-guest.nix")
];
boot = {
initrd = {
availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems."/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/boot";
fsType = "vfat";
options = [
"uid=0"
"gid=0"
"fmask=0077"
"dmask=0077"
"defaults"
];
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@ -0,0 +1,14 @@
{outputs, vars, ...}: {
imports = [
outputs.nixosModules.base
outputs.nixosModules.wsl
];
wsl.enable = true;
networking = {
inherit (vars) hostName domain;
};
system.stateVersion = "23.11";
}

8
lib/default.nix Normal file
View File

@ -0,0 +1,8 @@
{
mkPkgs = import ./mkPkgs.nix;
mkNixVim = import ./mkNixVim.nix;
mkNixVimLib = import ./mkNixVimLib.nix;
mkNixVimModule = import ./mkNixVimModule.nix;
mkSystem = import ./mkSystem.nix;
mkHomeConfiguration = import ./mkHomeConfiguration.nix;
}

View File

@ -0,0 +1,28 @@
{
nixpkgs,
inputs,
outputs,
flakeLib,
vars,
system,
profile,
modules ? [],
...
}: let
overlays = [
inputs.nixvim.overlays.default
inputs.neovim-nightly-overlay.overlays.default
inputs.nur.overlay
inputs.nixgl.overlay
];
in
import profile {
inherit inputs outputs modules;
extraSpecialArgs = {
inherit inputs outputs vars flakeLib;
inherit (inputs) nix-colors;
};
pkgs = flakeLib.mkPkgs {
inherit nixpkgs system overlays;
};
}

10
lib/mkNixVim.nix Normal file
View File

@ -0,0 +1,10 @@
{
system,
module,
inputs,
...
}: let
nixvim' = inputs.nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule module;
in
nvim

11
lib/mkNixVimLib.nix Normal file
View File

@ -0,0 +1,11 @@
let
mkNixVimLib = {
inputs,
system,
...
}: let
nixvimLib = inputs.nixvim.lib.${system};
in
nixvimLib;
in
mkNixVimLib

8
lib/mkNixVimModule.nix Normal file
View File

@ -0,0 +1,8 @@
{
pkgs,
module,
extraSpecialArgs ? {},
...
}: {
inherit pkgs module extraSpecialArgs;
}

10
lib/mkPkgs.nix Normal file
View File

@ -0,0 +1,10 @@
{
nixpkgs,
system,
overlays ? [],
...
}:
import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
}

23
lib/mkSystem.nix Normal file
View File

@ -0,0 +1,23 @@
{
inputs,
system,
hostName,
nixpkgs,
vars,
...
}: {
${hostName} = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
vars =
vars
// {
inherit hostName;
};
};
modules = [
./hosts/${hostName}/configuration.nix
];
};
}

View File

@ -0,0 +1,17 @@
{ lib, vars, ... }: with lib; {
home = {
inherit (vars) username homeDirectory;
language.base = vars.locale;
stateVersion = "23.05";
};
programs.home-manager.enable = true;
news = {
display = "silent";
json = mkForce { };
entries = mkForce [ ];
};
nixpkgs.config.allowUnfree = true;
}

View File

@ -0,0 +1,14 @@
{ lib, ... }: with lib; {
imports = [
./desktop
./mpd
];
desktop.enable = mkDefault true;
news = {
display = "silent";
json = mkForce { };
entries = mkForce [ ];
};
}

View File

@ -0,0 +1,87 @@
args @ {
pkgs,
lib,
config,
...
}:
lib.mkIf config.desktop.awesome.enable {
home = {
packages = with pkgs; [
mate.mate-polkit
];
sessionVariables = {
QT_QPA_PLATFORMTHEME = "qt5ct";
};
file = {
awesomewm-rc = {
target = ".config/awesome/rc.lua";
text = import ./config/rc.nix args;
};
awesomewm-theme = {
target = ".config/awesome/theme.lua";
text = import ./config/theme.nix args;
};
xinitrc = {
target = ".xinitrc";
text = ''
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
darkman dark
${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1 &
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval $(dbus-launch --exit-with-session --sh-syntax)
fi
systemctl --user import-environment DISPLAY XAUTHORITY
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
exec awesome --search ${pkgs.luaPackages.vicious}/lib/lua/5.2
'';
executable = true;
};
};
};
xsession = {
enable = true;
command = "awesome";
windowManager.awesome = {
package = pkgs.awesome.override {
lua = pkgs.luajit;
};
enable = true;
luaModules = with pkgs.luaPackages; [
luarocks
vicious
];
};
};
}

View File

@ -0,0 +1,625 @@
{ config, pkgs, ... }:
''
os.setlocale(os.getenv("LANG"))
pcall(require, "luarocks.loader")
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
local wibox = require("wibox")
local beautiful = require("beautiful")
local naughty = require("naughty")
local hotkeys_popup = require("awful.hotkeys_popup")
require("awful.hotkeys_popup.keys")
local vicious = require("vicious")
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors,
})
end
do
local in_error = false
awesome.connect_signal("debug::error", function(err)
if in_error then
return
end
in_error = true
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err),
})
in_error = false
end)
end
-- }}}
-- {{{ Variable definitions
local terminal = "${config.desktop.terminal}"
local file_manager = "${config.desktop.fileManager}"
local browser = "${config.desktop.browser}"
local launcher = "${pkgs.rofi}/bin/rofi -show drun"
local modkey = "Mod4"
local layouts = {
awful.layout.suit.spiral.dwindle,
awful.layout.suit.tile,
awful.layout.suit.floating,
}
local clock_format = "%A %d.%m.%Y %H:%M"
local wallpaper = os.getenv("HOME") .. "/.wallpaper.jpg"
local wifi_interface = ${config.desktop.awesome.wifi_device}
local bat_device = ${config.desktop.awesome.battery_device}
beautiful.init(os.getenv("HOME") .. "/.config/awesome/theme.lua")
beautiful.wallpaper = wallpaper
local tags = { "", "", "", "", "", "", "", "󰮂", "󰓓" }
awful.layout.layouts = layouts
-- }}}
-- {{{ Bar
-- Create a launcher widget and a main menu
local mytextclock = wibox.widget.textclock(" " .. clock_format)
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
awful.button({}, 1, function(t)
t:view_only()
end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({}, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({}, 4, function(t)
awful.tag.viewnext(t.screen)
end),
awful.button({}, 5, function(t)
awful.tag.viewprev(t.screen)
end)
)
local tasklist_buttons = gears.table.join(
awful.button({}, 1, function(c)
if c == client.focus then
c.minimized = true
else
c:emit_signal("request::activate", "tasklist", { raise = true })
end
end),
awful.button({}, 3, function()
awful.menu.client_list({ theme = { width = 250 } })
end),
awful.button({}, 4, function()
awful.client.focus.byidx(1)
end),
awful.button({}, 5, function()
awful.client.focus.byidx(-1)
end)
)
local function set_wallpaper(s)
-- Wallpaper
if beautiful.wallpaper then
local _wallpaper = beautiful.wallpaper
-- If wallpaper is a function, call it with the screen
if type(_wallpaper) == "function" then
_wallpaper = wallpaper(s)
end
gears.wallpaper.maximized(_wallpaper, s, true)
end
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper)
awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
-- Each screen has its own tag table.
--awful.tag({ " 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 " }, s, awful.layout.layouts[1])
awful.tag(tags, s, awful.layout.layouts[1])
local cpuwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.cpu)
vicious.register(cpuwidget, vicious.widgets.cpu, " $1% ", 5)
local memwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.mem)
vicious.register(memwidget, vicious.widgets.mem, " 󰍛 $1% ", 5)
local volwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.volume)
vicious.register(volwidget, vicious.widgets.volume, " $1% ", 1, { "Master", "-D", "pipewire" })
local wifiwidget = nil
if wifi_interface ~= nil then
wifiwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.wifiiw)
vicious.register(wifiwidget, vicious.widgets.wifiiw, " 󰖩 ''${linp}% ", 30, wifi_interface)
end
local batwidget = nil
if bat_device ~= nil then
batwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.bat)
vicious.register(batwidget, vicious.widgets.bat, " 󰁹 $2% ", 60, bat_device)
end
local mylayoutbox = awful.widget.layoutbox(s)
mylayoutbox:buttons(gears.table.join(
awful.button({}, 1, function()
awful.layout.inc(1)
end),
awful.button({}, 3, function()
awful.layout.inc(-1)
end),
awful.button({}, 4, function()
awful.layout.inc(1)
end),
awful.button({}, 5, function()
awful.layout.inc(-1)
end)
))
-- Create a taglist widget
local mytaglist = awful.widget.taglist({
screen = s,
filter = awful.widget.taglist.filter.noempty,
buttons = taglist_buttons,
})
-- Create a tasklist widget
local mytasklist = awful.widget.tasklist({
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons,
})
-- Create the wibox
local mywibox = awful.wibar({ position = "top", screen = s, height = 20 })
-- Add widgets to the wibox
mywibox:setup({
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
spacing = 6,
mytaglist,
},
mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
spacing = 6,
batwidget,
wifiwidget,
volwidget,
cpuwidget,
memwidget,
mytextclock,
wibox.widget.systray(),
mylayoutbox,
},
})
end)
-- }}}
-- {{{ Mouse bindings
root.buttons(gears.table.join(awful.button({}, 4, awful.tag.viewnext), awful.button({}, 5, awful.tag.viewprev)))
-- }}}
-- {{{ Key bindings
local globalkeys = gears.table.join(
awful.key({ modkey }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
awful.key({ modkey }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
awful.key({ modkey }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }),
awful.key({ modkey }, "Escape", awful.tag.history.restore, { description = "go back", group = "tag" }),
awful.key({ modkey }, "j", function()
awful.client.focus.byidx(1)
end, { description = "focus next by index", group = "client" }),
awful.key({ modkey }, "k", function()
awful.client.focus.byidx(-1)
end, { description = "focus previous by index", group = "client" }),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function()
awful.client.swap.byidx(1)
end, { description = "swap with next client by index", group = "client" }),
awful.key({ modkey, "Shift" }, "k", function()
awful.client.swap.byidx(-1)
end, { description = "swap with previous client by index", group = "client" }),
awful.key({ modkey, "Control" }, "j", function()
awful.screen.focus_relative(1)
end, { description = "focus the next screen", group = "screen" }),
awful.key({ modkey, "Control" }, "k", function()
awful.screen.focus_relative(-1)
end, { description = "focus the previous screen", group = "screen" }),
awful.key({ modkey }, "u", awful.client.urgent.jumpto, { description = "jump to urgent client", group = "client" }),
awful.key({ modkey }, "Tab", function()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end, { description = "go back", group = "client" }),
-- Standard program
awful.key({ modkey }, "Return", function()
awful.spawn(terminal)
end, { description = "open a terminal", group = "launcher" }),
awful.key({ modkey, "Shift" }, "x", function() awful.spawn("rofi -show p -modi p:rofi-power-menu") end, { description = "power menu", group = "launcher" }),
awful.key({ modkey, "Control" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }),
awful.key({ modkey, "Control" }, "x", awesome.quit, { description = "quit awesome", group = "awesome" }),
awful.key({ modkey }, "l", function()
awful.tag.incmwfact(0.05)
end, { description = "increase master width factor", group = "layout" }),
awful.key({ modkey }, "h", function()
awful.tag.incmwfact(-0.05)
end, { description = "decrease master width factor", group = "layout" }),
awful.key({ modkey, "Shift" }, "h", function()
awful.tag.incnmaster(1, nil, true)
end, { description = "increase the number of master clients", group = "layout" }),
awful.key({ modkey, "Shift" }, "l", function()
awful.tag.incnmaster(-1, nil, true)
end, { description = "decrease the number of master clients", group = "layout" }),
awful.key({ modkey, "Control" }, "h", function()
awful.tag.incncol(1, nil, true)
end, { description = "increase the number of columns", group = "layout" }),
awful.key({ modkey, "Control" }, "l", function()
awful.tag.incncol(-1, nil, true)
end, { description = "decrease the number of columns", group = "layout" }),
awful.key({ modkey }, "space", function()
awful.layout.inc(1)
end, { description = "select next", group = "layout" }),
awful.key({ modkey, "Shift" }, "space", function()
awful.layout.inc(-1)
end, { description = "select previous", group = "layout" }),
awful.key({ modkey, "Control" }, "n", function()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal("request::activate", "key.unminimize", { raise = true })
end
end, { description = "restore minimized", group = "client" }),
-- Prompt
awful.key({ modkey }, "r", function()
awful.spawn(launcher)
end, { description = "run launcher", group = "launcher" }),
awful.key({ modkey }, "w", function()
awful.spawn(browser)
end, { description = "run firefox", group = "launcher" }),
awful.key({ modkey }, "e", function()
awful.spawn(file_manager)
end, { description = "run file manager", group = "launcher" }),
-- Volume Keys
awful.key({}, "XF86AudioLowerVolume", function()
awful.util.spawn("amixer -q -D pipewire sset Master 5%-", false)
end),
awful.key({}, "XF86AudioRaiseVolume", function()
awful.util.spawn("amixer -q -D pipewire sset Master 5%+", false)
end),
awful.key({}, "XF86AudioMute", function()
awful.util.spawn("amixer -D pipewire set Master 1+ toggle", false)
end),
-- Media Keys
awful.key({}, "XF86AudioPlay", function()
awful.util.spawn("playerctl play-pause", false)
end),
awful.key({}, "XF86AudioNext", function()
awful.util.spawn("playerctl next", false)
end),
awful.key({}, "XF86AudioPrev", function()
awful.util.spawn("playerctl previous", false)
end)
)
local clientkeys = gears.table.join(
awful.key({ modkey }, "f", function(c)
c.fullscreen = not c.fullscreen
c:raise()
end, { description = "toggle fullscreen", group = "client" }),
awful.key({ modkey, "Shift" }, "q", function(c)
c:kill()
end, { description = "close", group = "client" }),
awful.key({ modkey }, "q", function(c)
c:kill()
end, { description = "close", group = "client" }),
awful.key(
{ modkey, "Control" },
"space",
awful.client.floating.toggle,
{ description = "toggle floating", group = "client" }
),
awful.key({ modkey, "Control" }, "Return", function(c)
c:swap(awful.client.getmaster())
end, { description = "move to master", group = "client" }),
awful.key({ modkey }, "o", function(c)
c:move_to_screen()
end, { description = "move to screen", group = "client" }),
awful.key({ modkey }, "t", function(c)
c.ontop = not c.ontop
end, { description = "toggle keep on top", group = "client" }),
awful.key({ modkey }, "n", function(c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end, { description = "minimize", group = "client" }),
awful.key({ modkey }, "m", function(c)
c.maximized = not c.maximized
c:raise()
end, { description = "(un)maximize", group = "client" }),
awful.key({ modkey, "Control" }, "m", function(c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end, { description = "(un)maximize vertically", group = "client" }),
awful.key({ modkey, "Shift" }, "m", function(c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end, { description = "(un)maximize horizontally", group = "client" })
)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
globalkeys = gears.table.join(
globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9, function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
end, { description = "view tag #" .. i, group = "tag" }),
-- Toggle tag display.
awful.key({ modkey, "Control" }, "#" .. i + 9, function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
end, { description = "toggle tag #" .. i, group = "tag" }),
-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9, function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
end
end
end, { description = "move focused client to tag #" .. i, group = "tag" }),
-- Toggle tag on focused client.
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:toggle_tag(tag)
end
end
end, { description = "toggle focused client on tag #" .. i, group = "tag" })
)
end
local clientbuttons = gears.table.join(
awful.button({}, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
end),
awful.button({ modkey }, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.resize(c)
end)
)
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
--
local function is_terminal(c)
return (c.class and c.class:match("itty")) and true or false
end
local function copy_size(c, parent_client)
if not c or not parent_client then
return
end
if not c.valid or not parent_client.valid then
return
end
c.x = parent_client.x
c.y = parent_client.y
c.width = parent_client.width
c.height = parent_client.height
end
local function check_resize_client(c)
if c.child_resize then
copy_size(c.child_resize, c)
end
end
client.connect_signal("property::size", check_resize_client)
client.connect_signal("property::position", check_resize_client)
client.connect_signal("manage", function(c)
if is_terminal(c) then
return
end
local parent_client = awful.client.focus.history.get(c.screen, 1)
if parent_client and is_terminal(parent_client) then
parent_client.child_resize = c
c.floating = true
copy_size(c, parent_client)
end
end)
--
awful.rules.rules = {
-- All clients will match this rule.
{
rule = {},
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
},
},
-- Floating clients.
{
rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
},
class = {
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer",
},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
},
},
properties = { floating = true },
},
-- Add titlebars to normal clients and dialogs
{ rule_any = { type = { "normal", "dialog" } }, properties = { titlebars_enabled = false } },
-- Set Firefox to always map on the tag named "2" on screen 1.
-- { rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" } },
{
rule_any = { class = { "steamwebhelper", "steam" } },
properties = { screen = 1, tag = tags[9] },
},
-- Media
{
rule = {
class = "mpv",
},
properties = { tag = tags[7], fullscreen = true, floating = false, maximized = false },
},
-- Games
{
rule_any = {
class = { "steam_app_251730" },
},
properties = { screen = 1, tag = tags[8], fullscreen = true, floating = false, maximized = false },
},
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function(c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
if not awesome.startup then
awful.client.setslave(c)
end
if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({}, 1, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({}, 3, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.resize(c)
end)
)
awful.titlebar(c):setup({
{ -- Left
awful.titlebar.widget.iconwidget(c),
buttons = buttons,
layout = wibox.layout.fixed.horizontal,
},
{ -- Middle
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c),
},
buttons = buttons,
layout = wibox.layout.flex.horizontal,
},
{ -- Right
awful.titlebar.widget.floatingbutton(c),
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.stickybutton(c),
awful.titlebar.widget.ontopbutton(c),
awful.titlebar.widget.closebutton(c),
layout = wibox.layout.fixed.horizontal(),
},
layout = wibox.layout.align.horizontal,
})
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", { raise = false })
end)
client.connect_signal("focus", function(c)
c.border_color = beautiful.border_focus
end)
client.connect_signal("unfocus", function(c)
c.border_color = beautiful.border_normal
end)
-- }}}
''

View File

@ -0,0 +1,134 @@
{ config, ... }:
''
---------------------------
-- Default awesome theme --
---------------------------
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir()
local theme = {}
theme.font = "monospace 11"
theme.useless_gap = dpi(4)
theme.border_width = dpi(2)
theme.fg_normal = "#${config.colorScheme.palette.base05}"
theme.fg_focus = "#${config.colorScheme.palette.base0D}"
theme.fg_urgent = "#${config.colorScheme.palette.base05}"
theme.fg_minimize = "#${config.colorScheme.palette.base05}"
theme.bg_normal = "#${config.colorScheme.palette.base00}"
theme.bg_focus = "#${config.colorScheme.palette.base01}"
theme.bg_urgent = "#${config.colorScheme.palette.base08}"
theme.bg_minimize = "#${config.colorScheme.palette.base00}"
theme.bg_systray = theme.bg_normal
theme.border_normal = "#${config.colorScheme.palette.base00}"
theme.border_focus = "#${config.colorScheme.palette.base0D}"
theme.border_marked = "#${config.colorScheme.palette.base0B}"
theme.tasklist_bg_focus = theme.bg_focus
theme.titlebar_bg_focus = theme.bg_focus
theme.titlebar_bg_normal = theme.bg_normal
theme.titlebar_fg_focus = theme.fg_focus
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|
-- description_font]
-- Example:
--theme.taglist_bg_focus = "#ff0000"
-- Generate taglist squares:
theme.taglist_spacing = dpi(2)
--local taglist_square_size = dpi(4)
--theme.taglist_squares_sel = theme_assets.taglist_squares_sel(taglist_square_size, theme.fg_normal)
--theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(taglist_square_size, theme.fg_normal)
-- Variables set for theming notifications:
-- notification_font
-- notification_[bg|fg]
-- notification_[width|height|margin]
-- notification_[border_color|border_width|shape|opacity]
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_submenu_icon = themes_path .. "default/submenu.png"
theme.menu_height = dpi(20)
theme.menu_width = dpi(150)
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"
-- Define the image to load
theme.titlebar_close_button_normal = themes_path .. "default/titlebar/close_normal.png"
theme.titlebar_close_button_focus = themes_path .. "default/titlebar/close_focus.png"
theme.titlebar_minimize_button_normal = themes_path .. "default/titlebar/minimize_normal.png"
theme.titlebar_minimize_button_focus = themes_path .. "default/titlebar/minimize_focus.png"
theme.titlebar_ontop_button_normal_inactive = themes_path .. "default/titlebar/ontop_normal_inactive.png"
theme.titlebar_ontop_button_focus_inactive = themes_path .. "default/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_active = themes_path .. "default/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_active = themes_path .. "default/titlebar/ontop_focus_active.png"
theme.titlebar_sticky_button_normal_inactive = themes_path .. "default/titlebar/sticky_normal_inactive.png"
theme.titlebar_sticky_button_focus_inactive = themes_path .. "default/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_active = themes_path .. "default/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_active = themes_path .. "default/titlebar/sticky_focus_active.png"
theme.titlebar_floating_button_normal_inactive = themes_path .. "default/titlebar/floating_normal_inactive.png"
theme.titlebar_floating_button_focus_inactive = themes_path .. "default/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_active = themes_path .. "default/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_active = themes_path .. "default/titlebar/floating_focus_active.png"
theme.titlebar_maximized_button_normal_inactive = themes_path .. "default/titlebar/maximized_normal_inactive.png"
theme.titlebar_maximized_button_focus_inactive = themes_path .. "default/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_active = themes_path .. "default/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active = themes_path .. "default/titlebar/maximized_focus_active.png"
theme.wallpaper = themes_path .. "default/background.png"
-- You can use your own layout icons like this:
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
theme.layout_max = themes_path .. "default/layouts/maxw.png"
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(theme.menu_height, theme.bg_focus, theme.fg_focus)
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = "Papirus-Dark"
return theme
''

View File

@ -0,0 +1,22 @@
{ lib, ... }: {
options = {
desktop = {
awesome = {
enable = lib.mkEnableOption "AwesomeWM";
wifi_device = lib.mkOption {
type = lib.types.str;
description = "the default launcher to use";
default = "nil";
example = "'wlp3s0'";
};
battery_device = lib.mkOption {
type = lib.types.str;
description = "the default launcher to use";
default = "nil";
example = "'BAT0'";
};
};
};
};
imports = [ ./awesomewm.nix ];
}

View File

@ -0,0 +1,59 @@
{
lib,
config,
nix-colors,
...
}: {
options = {
desktop = {
enable = lib.mkEnableOption "gui";
terminal = lib.mkOption {
type = lib.types.str;
description = "the default terminal to use";
default = "kitty";
};
fileManager = lib.mkOption {
type = lib.types.str;
description = "the default file_manager to use";
default = "thunar";
};
browser = lib.mkOption {
type = lib.types.str;
description = "the default browser to use";
default = "firefox";
};
launcher = lib.mkOption {
type = lib.types.str;
description = "the default launcher to use";
default = "rofi -show drun";
};
};
};
imports = [
nix-colors.homeManagerModules.default
./firefox
./keepassxc
./kitty
./nextcloud-client
./picom
./nixGL
./theme
./awesome
./rofi
];
config = lib.mkIf config.desktop.enable {
desktop.awesome.enable = lib.mkDefault true;
programs = {
keepassxc.enable = lib.mkDefault true;
firefox.enable = lib.mkDefault true;
kitty.enable = lib.mkDefault true;
};
services = {
nextcloud-client.enable = lib.mkDefault true;
udiskie.enable = lib.mkDefault true;
picom.enable = lib.mkDefault true;
};
fonts.fontconfig.enable = true;
colorScheme = nix-colors.colorSchemes.catppuccin-mocha;
};
}

View File

@ -0,0 +1,40 @@
{pkgs, config, lib, ...}: lib.mkIf config.programs.firefox.enable {
programs.firefox = {
package = pkgs.firefox.override {
nativeMessagingHosts = with pkgs; [
tridactyl-native
keepassxc
];
};
profiles.odie = {
isDefault = true;
id = 0;
name = "odie";
search = {
default = "DuckDuckGo";
force = true;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
adnauseam
istilldontcareaboutcookies
sponsorblock
stylus
keepassxc-browser
tridactyl
canvasblocker
deutsch-de-language-pack
greasemonkey
youtube-recommended-videos # unhook
return-youtube-dislikes
user-agent-string-switcher
];
settings = {
"browser.startup.homepage" = "https://duckduckgo.com";
"browser.search.region" = "DE";
"browser.search.isUS" = false;
"distribution.searchplugins.defaultLocale" = "de-DE";
"general.useragent.locale" = "de-DE";
};
};
};
}

View File

@ -0,0 +1,10 @@
{ pkgs, lib, config, ... }: {
options = {
programs.keepassxc.enable = lib.mkEnableOption "keepassxc";
};
config = lib.mkIf config.programs.keepassxc.enable {
home.packages = [
pkgs.keepassxc
];
};
}

View File

@ -0,0 +1,24 @@
{
pkgs,
config,
lib,
...
}: {
config = lib.mkIf config.programs.kitty.enable {
programs.kitty = {
font = {
name = "JetBrains Mono";
size = 10;
};
shellIntegration.enableZshIntegration = true;
settings = {
background_opacity = 1;
enable_audio_bell = "no";
visual_bell_duration = "0.025";
window_padding_width = 0;
symbol_map = "U+E5FA-U+E62B,U+E700-U+E7C5,U+F000-U+F2E0,U+E200-U+E2A9,U+F500-U+FD46,U+E300-U+E3EB,U+F400-U+F4A8,U+2665,U+26A1,U+F27C,U+E0A3,U+E0B4-U+E0C8,U+E0CA,U+E0CC-U+E0D2,U+E0D4,U+23FB-U+23FE,U+2B58,U+F300-U+F313,U+E000-U+E00D Symbols Nerd Font Mono";
};
theme = "Catppuccin-Mocha";
};
};
}

View File

@ -0,0 +1,5 @@
{lib,config,...}: lib.mkIf config.services.nextcloud-client.enable {
services.nextcloud-client = {
startInBackground = true;
};
}

View File

@ -0,0 +1,12 @@
{ pkgs, lib, config, ... }: {
options = {
services.nixGL.enable = lib.mkEnableOption "nixGL";
};
config = lib.mkIf config.services.nixGL.enable {
home.packages = with pkgs; [
nixgl.auto.nixGLDefault
nixgl.auto.nixGLNvidia
nixgl.auto.nixVulkanNvidia
];
};
}

View File

@ -0,0 +1,38 @@
{ config, lib, ... }: {
options = {
services = {
picom = {
glxBackend = lib.mkOption {
type = lib.types.str;
description = "the default terminal to use";
default = "glx";
};
};
};
};
config = {
services.picom = lib.mkIf config.services.picom.enable {
backend = config.services.picom.glxBackend;
fade = true;
opacityRules = [
"95:class_g = 'kitty' && focused"
"85:class_g = 'kitty' && !focused"
"95:class_g = 'Alacritty' && focused"
"85:class_g = 'Alacritty' && !focused"
"85:window_type = 'dock'"
];
settings = {
blur = {
method = "gaussian";
size = 10;
deviation = 5.0;
};
corner-radius = 6;
rounded-corners-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
];
};
};
};
}

View File

@ -0,0 +1,140 @@
{
pkgs,
config,
lib,
...
}: lib.mkIf config.programs.rofi.enable {
home.packages = with pkgs; [
rofi-power-menu
rofimoji
];
programs.rofi = {
extraConfig = {
modi = "run,drun,window";
icon-theme = "Papirus-Dark";
show-icons = true;
drun-display-format = "{icon} {name}";
hide-scrollbar = true;
display-drun = " Apps ";
display-run = " Run ";
display-window = " Window";
display-Network = " 󰤨 Network";
};
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
bg-col = mkLiteral "#1e1e2e";
bg-col-light = mkLiteral "#1e1e2e";
border-col = mkLiteral "#1e1e2e";
selected-col = mkLiteral "#1e1e2e";
blue = mkLiteral "#89b4fa";
fg-col = mkLiteral "#cdd6f4";
fg-col2 = mkLiteral "#f38ba8";
grey = mkLiteral "#6c7086";
width = 600;
font = "JetBrainsMono 11";
};
"element-text, element-icon, mode-switcher" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
window = {
height = mkLiteral "360px";
border = mkLiteral "3px";
border-color = mkLiteral "@border-col";
background-color = mkLiteral "@bg-col";
};
mainbox = {
background-color = mkLiteral "@bg-col";
};
inputbar = {
children = mkLiteral "[prompt,entry]";
background-color = mkLiteral "@bg-col";
border-radius = mkLiteral "5px";
padding = mkLiteral "2px";
};
prompt = {
background-color = mkLiteral "@blue";
padding = mkLiteral "6px";
text-color = mkLiteral "@bg-col";
border-radius = mkLiteral "3px";
margin = mkLiteral "20px 0px 0px 20px";
};
textbox-prompt-colon = {
expand = false;
str = ":";
};
entry = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 10px";
text-color = mkLiteral "@fg-col";
background-color = mkLiteral "@bg-col";
};
listview = {
border = mkLiteral "0px 0px 0px";
padding = mkLiteral "6px 0px 0px";
margin = mkLiteral "10px 0px 0px 20px";
columns = 2;
lines = 5;
background-color = mkLiteral "@bg-col";
};
element = {
padding = mkLiteral "5px";
background-color = mkLiteral "@bg-col";
text-color = mkLiteral "@fg-col";
};
element-icon = {
size = mkLiteral "25px";
};
"element selected" = {
background-color = mkLiteral "@selected-col ";
text-color = mkLiteral "@fg-col2";
};
mode-switcher = {
spacing = 0;
};
button = {
padding = mkLiteral "10px";
background-color = mkLiteral "@bg-col-light";
text-color = mkLiteral "@grey";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.5";
};
"button selected" = {
background-color = mkLiteral "@bg-col";
text-color = mkLiteral "@blue";
};
message = {
background-color = mkLiteral "@bg-col-light";
margin = mkLiteral "2px";
padding = mkLiteral "2px";
border-radius = mkLiteral "5px";
};
textbox = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 20px";
text-color = mkLiteral "@blue";
background-color = mkLiteral "@bg-col-light";
};
};
};
}

View File

@ -0,0 +1,31 @@
{
pkgs,
config,
lib,
...
}: {
options = {
theme.cursor.enable = lib.mkEnableOption "Xorg cursor";
};
config = lib.mkIf config.theme.cursor.enable {
home = {
pointerCursor = {
name = "Colloid-teal-dark";
package = pkgs.colloid-icon-theme;
size = 24;
gtk.enable = true;
x11.enable = true;
};
};
nixpkgs.config.packageOverrides = pkgs: {
colloid-icon-theme = pkgs.colloid-icon-theme.override {
colorVariants = ["teal"];
};
catppuccin-gtk = pkgs.catppuccin-gtk.override {
accents = ["blue"]; # You can specify multiple accents here to output multiple themes
size = "standard";
variant = "mocha";
};
};
};
}

View File

@ -0,0 +1,9 @@
{lib, ...}: {
imports = [
./cursor.nix
./gtk.nix
];
theme.cursor.enable = lib.mkDefault true;
theme.gtk.enable = lib.mkDefault true;
}

View File

@ -0,0 +1,27 @@
{
pkgs,
config,
lib,
...
}: {
options = {
theme.gtk.enable = lib.mkEnableOption "Xorg cursor";
};
config = lib.mkIf config.theme.gtk.enable {
gtk = {
enable = true;
cursorTheme = {
name = "Colloid-teal-dark";
package = pkgs.colloid-icon-theme;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Catppuccin-Mocha-Standard-Blue-Dark";
package = pkgs.catppuccin-gtk;
};
};
};
}

View File

@ -0,0 +1,5 @@
_: {
imports = [
./development
];
}

View File

@ -0,0 +1,12 @@
_: {
imports = [
./gitea
./neovim-ide
];
programs = {
lazygit.enable = true;
gitea-cli.enable = true;
neovim-ide.enable = true;
};
}

View File

@ -0,0 +1,10 @@
{ lib, pkgs, config, ... }: {
options = {
programs.gitea-cli.enable = lib.mkEnableOption "gitea-cli";
};
config = lib.mkIf config.programs.gitea-cli.enable {
home.packages = with pkgs; [
tea
];
};
}

View File

@ -0,0 +1,16 @@
{
outputs,
pkgs,
config,
lib,
...
}: {
options = {
programs.neovim-ide.enable = lib.mkEnableOption "neovim-ide";
};
config = lib.mkIf config.programs.neovim-ide.enable {
home = {
packages = [outputs.packages.${pkgs.system}.neovim-ide];
};
};
}

View File

@ -0,0 +1,13 @@
{ lib, ... }: {
imports = [
./mpd.nix
./ncmpcpp.nix
];
programs = {
ncmpcpp.enable = lib.mkDefault true;
};
services = {
mpd.enable = lib.mkDefault true;
};
}

View File

@ -0,0 +1,5 @@
{lib,config,...}: lib.mkIf config.services.mpd.enable {
services.mpd = {
musicDirectory = "/mnt/media/Audio/Musik";
};
}

View File

@ -0,0 +1,22 @@
{lib,config,...}: lib.mkIf config.programs.ncmpcpp.enable {
programs.ncmpcpp = {
bindings = [
{
key = "j";
command = "scroll_down";
}
{
key = "k";
command = "scroll_up";
}
{
key = "J";
command = ["select_item" "scroll_down"];
}
{
key = "K";
command = ["select_item" "scroll_up"];
}
];
};
}

View File

@ -0,0 +1,5 @@
_: {
imports = [
./shell
];
}

View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }: lib.mkIf config.programs.bat.enable {
home = {
packages = with pkgs; [
bat
];
sessionVariables = {
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
MANROFFOPT = "-c";
};
shellAliases = {
cat = "bat";
};
};
}

View File

@ -0,0 +1,60 @@
{
lib,
config,
...
}:
let
commonExcludes = import ./excludes.nix;
in
lib.mkIf config.services.borgmatic.enable {
programs.borgmatic = {
enable = true;
backups = {
home = {
location = {
patterns = [
"R /home/odie"
] ++ commonExcludes;
repositories = [
{
"path" = "ssh://odie@svartalbenheim.odie.intranet/./borg-backup";
"label" = "svartalbenheim";
}
];
extraConfig = {
remote_path = "/usr/local/bin/borg";
};
excludeHomeManagerSymlinks = true;
};
retention = {
keepHourly = 24;
keepDaily = 60;
keepWeekly = 52;
keepMonthly = 24;
keepYearly = 10;
};
consistency.checks = [
{
name = "repository";
frequency = "2 weeks";
}
{
name = "archives";
frequency = "4 weeks";
}
{
name = "data";
frequency = "8 weeks";
}
{
name = "extract";
frequency = "8 weeks";
}
];
};
};
};
services.borgmatic = {
frequency = "Mon..Sun *:00:30";
};
}

View File

@ -0,0 +1,258 @@
[
"- /home/*/.android"
"- /home/*/.AndroidStudio*/"
"- /home/*/Android/Sdk"
"- /home/*/.gradle"
"- /home/*/.gvm"
"- /home/*/.grails/"
"- /home/*/.grails_history"
"- /home/*/.kde/share/apps/nepomuk"
"- /home/*/.local/share/notbit"
"- /home/*/.local/libvirt"
"- /home/*/.local/share/libvirt"
"- /home/*/.vagrant"
"- /home/*/.vagrant.d"
"- /home/*/.wine"
"- /home/*/.wine*"
"- /home/*/.twister"
"- /home/*/twister"
"- /home/*/Applications/eclipse*"
"- /home/*/Downloads"
"- /home/*/*Popcorntime*"
"- /home/*/.aMule"
"- /home/*/Scribus"
"- /home/*/VirtualBox*"
"- /home/*/.local/share/gnome-boxes/images"
"- /home/*/Nextcloud"
"- /home/*/_build"
"- /home/*/.rvm"
"- /home/*/.local/share/Steam"
"- /home/*/.var/app/com.valvesoftware.Steam/.local/share/Steam"
"- /home/*/.steam"
"- /home/*/Steam"
"- /home/*/.minecraft"
"- /home/*/.technic"
"- /home/*/.PlayOnLinux"
"- /home/*/.local/share/lutris/runners/wine/"
"- /home/*/.config/spotify/Users"
"- /home/*/.var/app/com.spotify.Client/config/spotify/Users"
"- /home/*/.local/lib/python*"
"- /home/*/PycharmProjects/**/venv"
"- /home/*/.m2"
"- /home/*/Vaults"
"- /home/*/.docker/machine"
"- /home/*/.local/share/containers"
"- /home/*/.gvfs"
"- /home/*/.local/share/gvfs-metadata"
"- /home/*/.Private"
"- /home/*/.dbus"
"- /home/*/.cache"
"- /home/*/.var/app/*/cache"
"- /home/*/.var/app/*/.cache"
"- /home/*/.Trash"
"- /home/*/.Trash-1*"
"- /home/*/.local/share/Trash"
"- /home/*/Trash"
"- /home/*/.cddb"
"- /home/*/.aptitude"
"- /home/*/.npm"
"- /home/*/.nvm"
"- /home/*/.lldb"
"- /home/*/.biome"
"- /home/*/.adobe"
"- /home/*/.macromedia"
"- /home/*/.xsession-errors"
"- /home/*/.xsession-errors.old"
"- /home/*/.wayland-errors"
"- /home/*/.local/share/RecentDocuments"
"- /home/*/.recently-used"
"- /home/*/.recently-used.xbel"
"- /home/*/recently-used.xbel"
"- /home/*/.thumbnails"
"- /home/*/.thumb"
"- /home/*/Thumbs.db"
"- /home/*/.DS_Store"
"- /home/*/.localised"
"- /home/*/.CFUserTextEncoding"
"- /home/*/.zcompdump*"
"- /home/*/.wget-hsts"
"- /home/*/.cups"
"- /home/*/.subversion"
"- /home/*/.virtualenvs"
"- /home/*/.Xauthority"
"- /home/*/.ICEauthority"
"- /home/*/.gksu.lock"
"- /home/*/.pulse"
"- /home/*/.pulse-cookie"
"- /home/*/.esd_auth"
"- /home/*/.VeraCrypt-lock-*"
"- /home/*/.kde/share/apps/RecentDocuments"
"- /home/*/.kde4/share/apps/RecentDocuments"
"- /home/*/.kde/share/apps/klipper"
"- /home/*/.kde4/share/apps/klipper"
"- /home/*/.local/share/klipper"
"- /home/*/.kde/share/apps/okular/docdata"
"- /home/*/.kde/share/apps/gwenview/recentfolders"
"- /home/*/.kde4/share/apps/okular/docdata"
"- /home/*/.kde4/share/apps/gwenview/recentfolders"
"- /home/*/.local/share/okular/docdata"
"- /home/*/.local/share/org.kde.gwenview/recentfolders"
"- /home/*/.kde/share/apps/kmess/displaypics"
"- /home/*/.kde4/share/apps/kmess/displaypics"
"- /home/*/.kde/share/apps/kmess/customemoticons"
"- /home/*/.kde4/share/apps/kmess/customemoticons"
"- /home/*/.local/share/tracker"
"- /home/*/.local/share/torbrowser"
"- /home/*/.mozilla/firefox/*/Cache"
"- /home/*/.mozilla/firefox/*/minidumps"
"- /home/*/.mozilla/firefox/*/.parentlock"
"- /home/*/.mozilla/firefox/*/urlclassifier3.sqlite"
"- /home/*/.mozilla/firefox/*/blocklist.xml"
"- /home/*/.mozilla/firefox/*/extensions.sqlite"
"- /home/*/.mozilla/firefox/*/extensions.sqlite-journal"
"- /home/*/.mozilla/firefox/*/extensions.rdf"
"- /home/*/.mozilla/firefox/*/extensions.ini"
"- /home/*/.mozilla/firefox/*/extensions.cache"
"- /home/*/.mozilla/firefox/*/XUL.mfasl"
"- /home/*/.mozilla/firefox/*/XPC.mfasl"
"- /home/*/.mozilla/firefox/*/xpti.dat"
"- /home/*/.mozilla/firefox/*/compreg.dat"
"- /home/*/.mozilla/firefox/*/pluginreg.dat"
"- /home/*/.mozilla/seamonkey/*/Cache"
"- /home/*/.mozilla/seamonkey/*/minidumps"
"- /home/*/.mozilla/seamonkey/*/.parentlock"
"- /home/*/.mozilla/seamonkey/*/blocklist.xml"
"- /home/*/.mozilla/seamonkey/*/extensions.sqlite"
"- /home/*/.mozilla/seamonkey/*/extensions.rdf"
"- /home/*/.mozilla/seamonkey/*/extensions.ini"
"- /home/*/.mozilla/seamonkey/*/xpti.dat"
"- /home/*/.mozilla/seamonkey/*/compreg.dat"
"- /home/*/.mozilla/seamonkey/*/pluginreg.dat"
"- /home/*/.thunderbird/*/Cache"
"- /home/*/.opera/temporary_downloads"
"- /home/*/.opera/cache"
"- /home/*/.opera/thumbnails"
"- /home/*/.opera/opcache"
"- /home/*/.opera/icons"
"- /home/*/.opera/application_cache"
"- /home/*/.opera/widgets/*/cache"
"- /home/*/.opera/lock"
"- /home/*/.keychain"
"- /home/*/.komodoedit/*/codeintel/db"
"- /home/*/.komodoedit/*/host-*/*/codeintel"
"- /home/*/.komodoedit/*/XRE/Cache"
"- /home/*/.komodoedit/*/XRE/.activatestate/komodo edit/Crash Reports"
"- /home/*/.komodoedit/*/XRE/.activatestate/komodo edit/*/Cache"
"- /home/*/.komodoedit/*/XRE/.activatestate/komodo edit/*/minidump"
"- /home/*/.komodoedit/*/XRE/.parentlock"
"- /home/*/.komodoedit/*/XRE/extensions.rdf"
"- /home/*/.komodoedit/*/XRE/extensions.ini"
"- /home/*/.komodoedit/*/XRE/extensions.cache"
"- /home/*/.komodoedit/*/XRE/XPC.mfasl"
"- /home/*/.komodoedit/*/XRE/XUL.mfasl"
"- /home/*/.komodoedit/*/XRE/xpti.dat"
"- /home/*/.komodoedit/*/XRE/pluginreg.dat"
"- /home/*/.komodoedit/*/XRE/compreg.dat"
"- /home/*/.komodoedit/*/XRE/*.sqlite-journal"
"- /home/*/.komodoedit/*/pystdout.log"
"- /home/*/.komodoedit/*/pystderr.log"
"- /home/*/.komodoedit/*/history.sqlite.bak"
"- /home/*/.komodoedit/*/running.lock"
"- /home/*/.komodoedit/*/mutex.lock"
"- /home/*/.komodoedit/*/*.xmlc"
"- /home/*/.komodoedit/*/startup-env.tmp"
"- /home/*/.komodoedit/*/commandments.fifo"
"- /home/*/.komodoedit/*/history.sqlite"
"- /home/*/.gnupg/rnd"
"- /home/*/.gnupg/random_seed"
"- /home/*/.gnupg/.#*"
"- /home/*/.gnupg/*.lock"
"- /home/*/.gnupg/gpg-agent-info-*"
"- /home/*/.googleearth/Temp"
"- /home/*/.googleearth/Cache"
"- /home/*/.config/google-chrome/ShaderCache"
"- /home/*/.config/google-chrome/*/Local Storage"
"- /home/*/.config/google-chrome/*/Session Storage"
"- /home/*/.config/google-chrome/*/Application Cache"
"- /home/*/.config/google-chrome/*/History Index *"
"- /home/*/.config/google-chrome/*/Service Worker/CacheStorage"
"- /home/*/.config/chromium/*/Local Storage"
"- /home/*/.config/chromium/*/Session Storage"
"- /home/*/.config/chromium/*/Service Worker/CacheStorage"
"- /home/*/.config/chromium/*/Application Cache"
"- /home/*/.config/chromium/*/History Index *"
"- /home/*/snap/chromium/common/.cache"
"- /home/*/snap/chromium/*/.config/chromium/*/Service Worker/CacheStorage"
"- /home/*/snap/chromium/*/.local/share/"
"- /home/*/snap/riot-web/"
"- /home/*/.config/BraveSoftware/Brave-Browser/*/Feature Engagement Tracker/"
"- /home/*/.config/BraveSoftware/Brave-Browser/*/Local Storage/"
"- /home/*/.config/BraveSoftware/Brave-Browser/*/Service Worker/CacheStorage/"
"- /home/*/.config/BraveSoftware/Brave-Browser/*/Session Storage/"
"- /home/*/.config/BraveSoftware/Brave-Browser/Safe Browsing/"
"- /home/*/.config/BraveSoftware/Brave-Browser/ShaderCache/"
"- /home/*/.gradle/caches"
"- /home/*/.m2/repository"
"- /home/*/.local/share/baloo"
"- /home/*/.local/share/zeitgeist"
"- /home/*/.local/share/akonadi"
"- /home/*/.purple/icons"
"- /home/*/.guayadeque/cache.db"
"- /home/*/.java/deployment/cache"
"- /home/*/.icedteaplugin"
"- /home/*/.icedtea"
"- /home/*/.gnome2/epiphany/favicon_cache"
"- /home/*/nohup.out"
"- /home/*/.config/libreoffice/4/cache"
"- /home/*/.config/freshwrapper-data/Shockwave Flash/WritableRoot/#SharedObjects"
"- /home/*/.config/*/Cache"
"- /home/*/.config/Atom/*Cache"
"- /home/*/.config/Atom/IndexedDB"
"- /home/*/.atom/compile-cache/"
"- /home/*/.vim/bundle/*"
"- /home/*/.viminfo"
"- /home/*/.vscode-oss/extensions/*"
"- /home/*/.vscode/extensions/*"
"- /home/*/.config/Code - OSS/logs/"
"- /home/*/.config/Code/logs/"
"- /home/*/.config/Code/CachedData/*"
"- /home/*/.config/VSCodium/CachedExtensionVSIXs"
"- /home/*/.config/VirtualBox/VBoxSVC.log*"
"- /home/*/.config/VirtualBox/VBoxGuestAdditions_*"
"- /home/*/.cargo"
"- /home/*/.rustup"
"- /home/*/.kerl"
"- /home/*/go/pkg/mod/cache"
"- /home/*/.ccache/?"
"- /home/*/.ccache/tmp"
"- /home/*/.nv/GLCache"
"- /home/*/.ICAClient/logs"
"- /home/*/.ICAClient/.tmp"
"- /home/*/.ICAClient/cache/zlcache"
"- /home/*/.config/geany/geany_socket_*"
"- /home/*/.config/lbry"
"- /home/*/.local/share/lbry/lbrynet"
"- /home/*/.config/**/blob_storage"
"- /home/*/.config/**/Application Cache"
"- /home/*/.config/**/Cache"
"- /home/*/.config/**/CachedData"
"- /home/*/.config/**/Code Cache"
"- /home/*/.config/**/GPUCache"
"- /home/*/.config/**/Service Worker/CacheStorage"
"- /home/*/.var/app/**/blob_storage"
"- /home/*/.var/app/**/Application Cache"
"- /home/*/.var/app/**/Cache"
"- /home/*/.var/app/**/CachedData"
"- /home/*/.var/app/**/Code Cache"
"- /home/*/.var/app/**/GPUCache"
"- /home/*/.var/app/**/Service Worker/CacheStorage"
"- /home/*/.config/scc/daemon.socket"
"- */node_modules"
"- */bower_components"
"- */target/debug"
"- */target/release"
"- */_build"
"- */.tox"
"- */venv"
"- */.venv"
]

View File

@ -0,0 +1,8 @@
{ config, lib, ... }: lib.mkIf config.programs.btop.enable {
programs.btop = {
settings = {
color_theme = "Default";
theme_background = false;
};
};
}

View File

@ -0,0 +1,40 @@
{ lib, pkgs, ... }: with lib; {
imports = [
./direnv
./fzf
./git
./lf
./lsd
./starship
./tmux
./zsh
./btop
./zoxide
./ssh
./bat
./tldr
./borgmatic
];
home.packages = with pkgs; [
ripgrep
fd
gdu
];
programs = {
bat.enable = mkDefault true;
btop.enable = mkDefault true;
direnv.enable = mkDefault true;
fzf.enable = mkDefault true;
git.enable = mkDefault true;
lf.enable = mkDefault true;
lsd.enable = mkDefault true;
ssh.enable = mkDefault true;
starship.enable = mkDefault true;
tmux.enable = mkDefault true;
zoxide.enable = mkDefault true;
zsh.enable = mkDefault true;
tldr.enable = mkDefault true;
};
}

View File

@ -0,0 +1,14 @@
{ pkgs, lib, config, ... }: lib.mkIf config.programs.direnv.enable {
programs.direnv = {
enableZshIntegration = true;
config = {
global = {
disable_stdin = true;
strict_env = true;
};
};
nix-direnv.enable = true;
stdlib = builtins.readFile ../../../../configs/home-manager/direnv/stdlib.sh;
};
}

View File

@ -0,0 +1,15 @@
{ config, lib, ... }: lib.mkIf config.programs.fzf.enable {
programs = {
fzf = {
enableZshIntegration = true;
defaultCommand = "fd --type f";
defaultOptions = [
"--height 40%"
"--border"
];
tmux = {
enableShellIntegration = true;
};
};
};
}

View File

@ -0,0 +1,100 @@
{ config
, pkgs
, lib
, vars
, ...
}: lib.mkIf config.programs.git.enable {
home = {
packages = with pkgs; [ pre-commit ];
};
programs = {
git = {
userName = vars.name;
userEmail = vars.email;
extraConfig = {
push = {
default = "matching";
};
core = {
autocrlf = "input";
#excludesFile = "${config.xdg.configHome}/git/ignore";
};
pull = {
rebase = false;
};
init = {
defaultBranch = "master";
};
};
attributes = [ ];
ignores = [
"# Created by https://www.toptal.com/developers/gitignore/api/vim,linux"
"# Edit at https://www.toptal.com/developers/gitignore?templates=vim,linux"
""
"### Linux ###"
"*~"
""
"# temporary files which can be created if a process still has a handle open of a deleted file"
".fuse_hidden*"
""
"# KDE directory preferences"
".directory"
""
"# Linux trash folder which might appear on any partition or disk"
".Trash-*"
""
"# .nfs files are created when an open file is removed but is still being accessed"
".nfs*"
""
"### Vim ###"
"# Swap"
"[._]*.s[a-v][a-z]"
"!*.svg # comment out if you don't need vector files"
"[._]*.sw[a-p]"
"[._]s[a-rt-v][a-z]"
"[._]ss[a-gi-z]"
"[._]sw[a-p]"
""
"# Session"
"Session.vim"
"Sessionx.vim"
""
"# Temporary"
".netrwhist"
"# Auto-generated tag files"
"tags"
"# Persistent undo"
"[._]*.un~"
""
"# End of https://www.toptal.com/developers/gitignore/api/vim,linux"
""
"# Created by https://www.toptal.com/developers/gitignore/api/nix"
"# Edit at https://www.toptal.com/developers/gitignore?templates=nix"
""
"/result"
""
"# End of https://www.toptal.com/developers/gitignore/api/nix"
""
"# Created by https://www.toptal.com/developers/gitignore/api/rust"
"# Edit at https://www.toptal.com/developers/gitignore?templates=rust"
# Created by https://www.toptal.com/developers/gitignore/api/direnv
"# Edit at https://www.toptal.com/developers/gitignore?templates=direnv"
""
"### direnv ###"
".direnv"
".envrc"
""
"# End of https://www.toptal.com/developers/gitignore/api/direnv"
"# Created by https://www.toptal.com/developers/gitignore/api/dotenv"
" # Edit at https://www.toptal.com/developers/gitignore?templates=dotenv"
""
"### dotenv ###"
"!.env.example"
".env"
".env.*"
""
"# End of https://www.toptal.com/developers/gitignore/api/dotenv"
];
};
};
}

View File

@ -0,0 +1,56 @@
{ pkgs, config, lib, ... }: lib.mkIf config.programs.lf.enable {
home = {
packages = with pkgs; [
chafa
ctpv
];
file = {
".config/lf/icons" = {
source = ../../../../configs/home-manager/lf/icons;
};
".config/lf/colors" = {
source = ../../../../configs/home-manager/lf/colors;
};
};
};
programs.lf = {
commands = {
get-mime-type = "%xdg-mime query filetype \"$f\"";
open = ''
''${{
case $(file --mime-type $f -b) in
text/*|application/json|inode/x-empty|application/octet-stream) $EDITOR "$f" ;;
image/svg+xml) display -- "$f" ;;
audio/*) mpv --audio-display=no "$f" ;;
video/*) setsid -f mpv "$f" -quiet >/dev/null 2>&1 ;;
image/vnd.djvu|application/pdf|application/pdf|application/epub*) setsid -f $BROWSER "$f" >/dev/null 2>&1 ;;
application/pgp-encrypted) $EDITOR "$f" ;;
*) for f in $fx; do setsid -f $OPENER "$f" >/dev/null 2>&1; done ;;
esac
}}'';
on-select = ''
&{{
lf -remote "send $id set statfmt \"$(lsd -ld --color=always "$f")\""
}}
'';
};
settings = {
icons = true;
period = 1;
info = "size";
dircounts = true;
sixel = true;
scrolloff = 5;
hidden = true;
previewer = "ctpv";
cleaner = "ctpvclear";
};
keybindings = {
"<enter>" = "open";
};
extraConfig = ''
&ctpv -s $id
&ctpvquit $id
'';
};
}

View File

@ -0,0 +1,7 @@
{lib, config, ...}: lib.mkIf config.programs.lsd.enable {
programs = {
lsd = {
enableAliases = true;
};
};
}

View File

@ -0,0 +1,26 @@
{
pkgs,
config,
lib,
...
}:
lib.mkIf config.programs.ssh.enable {
home.packages = with pkgs; [tea];
programs = {
ssh = {
addKeysToAgent = "yes";
forwardAgent = true;
matchBlocks = {
"svartalbenheim.odie.intranet" = {
hostname = "svartalbenheim.odie.intranet";
identityFile = "~/.ssh/id_ed25519_local";
compression =false;
};
};
};
};
services = {
ssh-agent.enable = true;
};
}

View File

@ -0,0 +1,336 @@
{ lib, config, ... }:
lib.mkIf config.programs.starship.enable {
programs = {
starship = {
enableZshIntegration = true;
settings = {
add_newline = false;
format = lib.concatStrings [
"$os"
"$username"
"$hostname"
"$directory"
"$jobs"
"$character"
];
right_format = lib.concatStrings [
"$aws"
"$gcloud"
"$openstack"
"$azure"
"$fossil_branch"
"$git_branch"
"$git_commit"
"$git_state"
"$git_metrics"
"$git_statu"
"$hg_branch"
"$package"
"$c"
"$cmake"
"$cobol"
"$daml"
"$dart"
"$deno"
"$dotnet"
"$elixir"
"$elm"
"$erlang"
"$fennel"
"$golang"
"$guix_shell"
"$haskell"
"$haxe"
"$helm"
"$java"
"$julia"
"$kotlin"
"$gradle"
"$lua"
"$nim"
"$nodejs"
"$ocaml"
"$opa"
"$perl"
"$php"
"$pulumi"
"$purescript"
"$python"
"$raku"
"$rlang"
"$red"
"$ruby"
"$rust"
"$scala"
"$solidity"
"$swift"
"$terraform"
"$vlang"
"$vagrant"
"$zig"
"$buf"
"$nix_shell"
"$conda"
"$meson"
"$spack"
"$crystal"
];
scan_timeout = 10;
character = {
success_symbol = "[](green)";
error_symbol = "[](red)";
format = " $symbol ";
};
username = {
style_user = "green";
style_root = "red";
format = "[$user]($style)";
disabled = false;
show_always = true;
};
hostname = {
ssh_only = false;
format = "@[$hostname](cyan)";
disabled = false;
ssh_symbol = " ";
};
directory = {
format = " [$path]($style)[$read_only]($read_only_style)";
style = "yellow";
truncation_length = 2;
truncation_symbol = "/";
read_only = " 󰌾";
};
jobs = {
format = " [$symbol$number]($style) ";
symbol = "";
};
aws = {
symbol = " ";
};
buf = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
c = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
conda = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
crystal = {
symbol = " ";
};
dart = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
docker_context = {
symbol = " ";
};
elixir = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
elm = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
fossil_branch = {
symbol = " ";
};
golang = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
guix_shell = {
symbol = " ";
};
haskell = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
haxe = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
hg_branch = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
git_branch = {
symbol = " ";
format = "[$symbol$branch(:$remote_branch)]($style) ";
};
java = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
julia = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
kotlin = {
symbol = " ";
};
lua = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
memory_usage = {
symbol = "󰍛 ";
format = "[$symbol($version )]($style)";
};
meson = {
symbol = "󰔷 ";
format = "[$symbol($version )]($style)";
};
nim = {
symbol = "󰆥 ";
format = "[$symbol($version )]($style)";
};
nix_shell = {
symbol = " ";
format = "[$symbol$state( \\($name\\))]($style)";
};
nodejs = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
ocaml = {
symbol = " ";
};
os = {
disabled = false;
style = "blue";
};
os.symbols = {
Alpaquita = " ";
Alpine = " ";
Amazon = " ";
Android = " ";
Arch = " ";
Artix = " ";
CentOS = " ";
Debian = " ";
DragonFly = " ";
Emscripten = " ";
EndeavourOS = " ";
Fedora = " ";
FreeBSD = " ";
Garuda = "󰛓 ";
Gentoo = " ";
HardenedBSD = "󰞌 ";
Illumos = "󰈸 ";
Linux = " ";
Mabox = " ";
Macos = " ";
Manjaro = " ";
Mariner = " ";
MidnightBSD = " ";
Mint = " ";
NetBSD = " ";
NixOS = " ";
OpenBSD = "󰈺 ";
openSUSE = " ";
OracleLinux = "󰌷 ";
Pop = " ";
Raspbian = " ";
Redhat = " ";
RedHatEnterprise = " ";
Redox = "󰀘 ";
Solus = "󰠳 ";
SUSE = " ";
Ubuntu = " ";
Unknown = " ";
Windows = "󰍲 ";
};
package = {
symbol = "󰏗 ";
format = "[$symbol($version )]($style)";
};
perl = {
symbol = " ";
};
php = {
symbol = " ";
};
pijul_channel = {
symbol = " ";
};
python = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
rlang = {
symbol = "󰟔 ";
format = "[$symbol($version )]($style)";
};
ruby = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
rust = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
scala = {
symbol = " ";
format = "[$symbol($version )]($style)";
};
swift = {
symbol = " ";
};
zig = {
symbol = " ";
};
};
};
};
}

View File

@ -0,0 +1,8 @@
{ pkgs, config, lib, ... }: {
options = {
programs.tldr.enable = lib.mkEnableOption "tldr";
};
config = lib.mkIf config.programs.tldr.enable {
home.packages = with pkgs; [ tldr ];
};
}

View File

@ -0,0 +1,90 @@
{ pkgs, lib, config, ... }:
let
catppuccin = pkgs.callPackage ../../../../pkgs/tmuxPlugins/catppuccin.nix {};
in
{
options = {
};
config = {
programs.tmux = lib.mkIf config.programs.tmux.enable {
newSession = false;
mouse = true;
keyMode = "vi";
historyLimit = 10240;
clock24 = true;
baseIndex = 1;
aggressiveResize = true;
shortcut = "a";
sensibleOnTop = true;
escapeTime = 0;
tmuxp.enable = true;
plugins = with pkgs.tmuxPlugins; [
sensible
yank
{
plugin = catppuccin;
extraConfig = ''
set -g @catppuccin_window_default_text "#W" # use "#W" for application instead of directory
set -g @catppuccin_window_current_text "#W" # use "#W" for application instead of directory
set -g @catppuccin_window_status_enable "yes"
set -g @catppuccin_status_modules_right "directory user host date_time session"
'';
}
better-mouse-mode
{
plugin = tmux-fzf;
extraConfig = ''
unbind A
TMUX_FZF_LAUNCH_KEY="f"
TMUX_FZF_PANE_FORMAT="[#{window_name}] #{pane_current_command} [#{pane_width}x#{pane_height}] [history #{history_size}/#{history_limit}, #{history_bytes} bytes] #{?pane_active,[active],[inactive]}"
'';
}
];
extraConfig = ''
# Quick pane cycling
unbind ^A
bind ^A last-window
#unbind 'Space'
#bind 'Space' next-window
bind-key C-s split-window -v
bind-key C-v split-window -h
set -g renumber-windows on
# Open new panes and windows with the current panes path
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
set-option -sa terminal-features ',xterm-256color:RGB'
set-option -sa terminal-features ',st-256color:RGB'
set-option -sa terminal-features ',xterm-kitty:RGB'
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -T copy-mode-vi 'C-h' 'select-pane -L'
bind-key -T copy-mode-vi 'C-j' 'select-pane -D'
bind-key -T copy-mode-vi 'C-k' 'select-pane -U'
bind-key -T copy-mode-vi 'C-l' 'select-pane -R'
bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1'
bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1'
bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1'
bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1'
bind-key -T copy-mode-vi M-h resize-pane -L 1
bind-key -T copy-mode-vi M-j resize-pane -D 1
bind-key -T copy-mode-vi M-k resize-pane -U 1
bind-key -T copy-mode-vi M-l resize-pane -R 1
'';
};
};
}

View File

@ -0,0 +1,10 @@
{ config, lib, ... }: lib.mkIf config.programs.zoxide.enable {
programs = {
zoxide = {
enableZshIntegration = true;
options = [
"--cmd cd"
];
};
};
}

View File

@ -0,0 +1,45 @@
{ config, lib, ... }: lib.mkIf config.programs.zsh.enable {
programs = {
zsh = {
defaultKeymap = "emacs";
dotDir = ".config/zsh";
shellAliases = {
j = "z";
ji = "zi";
};
initExtra = builtins.readFile ../../../../configs/home-manager/zsh/zshrc.zsh;
completionInit = ''
autoload -U compinit bashcompinit
compinit
bashcompinit'';
history = {
path = "${config.xdg.cacheHome}/zsh_history";
save = 100000;
size = 100000;
share = true;
extended = true;
};
historySubstringSearch = {
enable = true;
searchDownKey = [
"^[[B"
];
searchUpKey = [
"^[[A"
];
};
zplug = {
enable = true;
plugins = [
{ name = "zsh-users/zsh-completions"; }
{ name = "zdharma-continuum/fast-syntax-highlighting"; }
{ name = "zsh-users/zsh-autosuggestions"; }
{ name = "nix-community/nix-zsh-completions"; }
];
};
envExtra = ''
export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m'
'';
};
};
}

View File

@ -0,0 +1,5 @@
_: {
imports = [
./systemdboot.nix
];
}

View File

@ -0,0 +1,5 @@
{config, lib, ...}: lib.mkIf config.boot.loader.systemd-boot.enable {
boot.loader = {
efi.canTouchEfiVariables = true;
};
}

View File

@ -0,0 +1,16 @@
_: {
imports = [
./bootloader
./user
./network
./i18n
./nixos
./programs
./ssh
./power-management
];
config = {
hardware.enableRedistributableFirmware = true;
};
}

View File

@ -0,0 +1,11 @@
{ inputs, vars, ... }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs vars; };
};
}

View File

@ -0,0 +1,11 @@
{ config, lib, pkgs, vars, ... }:
let
inherit (vars) locale timeZone;
in
{
i18n.defaultLocale = locale;
time.timeZone = timeZone;
console.keyMap = "de-latin1-nodeadkeys";
}

View File

@ -0,0 +1,10 @@
{ config, lib, pkgs, vars, ... }:
let
inherit (vars) hostName;
in
{
networking = {
inherit hostName;
firewall.enable = true;
};
}

View File

@ -0,0 +1,16 @@
_: {
nix = {
optimise = {
automatic = true;
};
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
}

View File

@ -0,0 +1,30 @@
{ lib, config, ... }: {
options = {
services.power-management.enable = lib.mkEnableOption "power-management";
};
config = lib.mkIf config.services.power-management.enable {
services = {
power-profiles-daemon.enable = true;
upower.enable = true;
};
users.groups.power = { };
security.polkit = {
extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units" ||
action.id == "org.freedesktop.systemd1.manage-unit-files") {
if (action.lookup("unit") == "poweroff.target") {
if (subject.isInGroup("power")) {
return polkit.Result.YES;
} else {
return polkit.Result.AUTH_ADMIN;
}
}
}
});
'';
};
};
}

View File

@ -0,0 +1,26 @@
{ config, lib, pkgs, vars, ... }:
{
environment = {
systemPackages = with pkgs; [
vim
git
openssh
file
w3m
btop
iftop
iotop
ncdu
];
etc = {
"ncdu.conf".text = ''
--color dark
'';
};
};
programs = {
zsh.enable = true;
command-not-found.enable = false;
};
}

View File

@ -0,0 +1,15 @@
{ pkgs, lib, config, ... }: {
options = {
hardware.raspberry-pi.cec.enable = lib.mkEnableOption "raspberry pi cec software";
};
config = {
services.udev.extraRules = ''
# allow access to raspi cec device for video group (and optionally register it as a systemd device, used below)
KERNEL=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq"
'';
environment.systemPackages = with pkgs; [
libcec
];
};
}

View File

@ -0,0 +1,11 @@
{ pkgs, lib, config, ... }: {
options = {
hardware.raspberry-pi.enable = lib.mkEnableOption "raspberry pi software";
};
config = lib.mkIf config.hardware.raspberry-pi.enable {
environment.systemPackages = with pkgs; [
libraspberrypi
raspberrypi-eeprom
];
};
}

View File

@ -0,0 +1,9 @@
{ lib, config, ... }: lib.mkIf config.services.openssh.enable {
services.openssh = {
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
openFirewall = true;
};
}

View File

@ -0,0 +1,53 @@
{ config, lib, pkgs, vars, ... }:
let
inherit (vars) username name locale hostname sshKeys;
baseGroups = [
"users"
"wheel"
];
rpiGroups =
if config.hardware.raspberry-pi.enable then [
"audio"
"video"
"plugdev"
"adm"
"disk"
"i2c"
"spi"
"power"
] else [ ];
extraGroups = baseGroups ++ rpiGroups;
basePackages = with pkgs; [ home-manager ];
wslPackages =
if config.wsl.enable then with pkgs; [
wslu
wsl-open
] else [ ];
packages = basePackages ++ wslPackages;
in
{
options = {
hardware.raspberry-pi.enable = lib.mkEnableOption "raspberry pi features";
};
config = {
users = {
groups.${username} = { };
users = {
${username} = {
inherit packages extraGroups;
name = username;
uid = 1000;
isNormalUser = true;
home = "/home/${username}";
description = name;
group = config.users.groups.${username}.name;
openssh.authorizedKeys.keys = sshKeys;
shell = pkgs.zsh;
};
};
};
};
}

View File

@ -0,0 +1,6 @@
_: {
imports = [
./base
./wsl
];
}

View File

@ -0,0 +1,16 @@
{ lib, ... }: {
imports = [
./fonts
./sound
./xorg
];
options = {
desktop.enable = lib.mkEnableOption "desktop features";
};
config = {
programs.dconf.enable = true;
hardware.opengl.enable = true;
};
}

View File

@ -0,0 +1,33 @@
{ pkgs, lib, config, ... }: lib.mkIf config.desktop.enable {
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
roboto
roboto-slab
noto-fonts
noto-fonts-emoji
sarasa-gothic
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
fontconfig = {
antialias = true;
allowType1 = false;
allowBitmaps = false;
hinting = {
enable = true;
style = "slight";
autohint = false;
};
subpixel = {
rgba = "rgb";
lcdfilter = "default";
};
defaultFonts = {
emoji = [ "Noto Color Emoji" ];
serif = [ "Roboto Slab" "Noto Serif" "Sarasa Gothic CL" "Symbols Nerd Font" ];
sansSerif = [ "Roboto" "Noto Sans" "Sarasa Gothic CL" "Symbols Nerd Font" ];
monospace = [ "JetBrains Mono" "Sarasa Mono CL" "Symbols Nerd Font Mono" ];
};
};
};
}

View File

@ -0,0 +1,5 @@
{
networking.networkmanager = {
enable = true;
};
}

View File

@ -0,0 +1,18 @@
{ pkgs, lib, config, ... }:
lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [
alsa-utils
];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
sound.enable = true;
}

View File

@ -0,0 +1,35 @@
{ lib, config, vars, ... }: {
imports = [
./i18n.nix
];
config = {
services.xserver = lib.mkIf config.desktop.enable {
enable = true;
displayManager = {
autoLogin = {
user = vars.username;
enable = true;
};
lightdm = {
enable = true;
greeters.gtk.enable = true;
};
defaultSession = "none+awesome";
};
libinput = {
enable = true;
# disabling mouse acceleration
mouse = {
accelProfile = "flat";
};
# disabling touchpad acceleration
touchpad = {
accelProfile = "flat";
};
};
};
};
}

View File

@ -0,0 +1,8 @@
_: {
services.xserver = {
xkb = {
layout = "de";
variant = "nodeadkeys,";
};
};
}

View File

@ -0,0 +1,18 @@
{ config, lib, pkgs, vars, inputs, ... }:
let
inherit (vars) username hostName;
in
{
imports = [
inputs.nixos-wsl.nixosModules.wsl
];
config = lib.mkIf config.wsl.enable {
wsl = {
defaultUser = username;
nativeSystemd = true;
useWindowsDriver = true;
wslConf = { network.hostname = hostName; };
};
};
}

View File

@ -0,0 +1,8 @@
{
imports = [
./yank_highlight.nix
#./remember_cursor_position.nix
./set_conceal_level.nix
./filetype_options.nix
];
}

View File

@ -0,0 +1,43 @@
let
group = "FiletypeOptions";
mkFileTypeOptions = {
pattern,
indentSize ? 4,
expandTab ? true,
}: let
expandtab =
if expandTab
then "true"
else "false";
in {
inherit group pattern;
event = ["BufRead" "BufNewFile"];
callback = {
__raw = ''
function()
local setlocal = vim.opt_local
setlocal.expandtab = ${expandtab}
setlocal.shiftwidth = ${builtins.toString indentSize}
setlocal.tabstop = ${builtins.toString indentSize}
end
'';
};
};
in {
autoGroups = {
${group} = {
clear = true;
};
};
autoCmd = [
(mkFileTypeOptions {
pattern = ["*.nix"];
indentSize = 2;
})
(mkFileTypeOptions {
pattern = ["*.go"];
expandTab = false;
indentSize = 4;
})
];
}

View File

@ -0,0 +1,35 @@
let
group = "RememberCursorPosition";
in {
autoGroups = {
${group} = {
clear = true;
};
};
autoCmd = [
{
inherit group;
event = "BufRead";
callback = {
__raw = ''
function(opts)
buffer = opts.buf,
vim.api.nvim_create_autocmd("BufWinEnter", {
callback = function()
local ft = vim.bo[opts.buf].filetype
local last_known_line = vim.api.nvim_buf_get_mark(opts.buf, '"')[1]
if
not (ft:match("commit") and ft:match("rebase"))
and last_known_line > 1
and last_known_line <= vim.api.nvim_buf_line_count(opts.buf)
then
vim.api.nvim_feedkeys([[g`"]], "nx", false)
end
end,
})
end
'';
};
}
];
}

View File

@ -0,0 +1,34 @@
let
group = "SetConcealLevel";
pattern = [
"*.md"
"*.json"
"*.norg"
];
mkConcealFunction = level: {
__raw = ''
function()
vim.opt.conceallevel = ${level}
end
'';
};
in {
autoGroups = {
${group} = {
clear = true;
};
};
autoCmd = [
{
inherit pattern group;
event = ["BufEnter" "BufWinEnter"];
callback = mkConcealFunction "3";
}
{
inherit pattern group;
event = ["BufLeave" "BufWinLeave"];
callback = mkConcealFunction "0";
}
];
}

View File

@ -0,0 +1,23 @@
let
group = "YankHightlight";
in {
autoGroups = {
${group} = {
clear = true;
};
};
autoCmd = [
{
inherit group;
event = "TextYankPost";
pattern = "*";
callback = {
__raw = ''
function()
vim.highlight.on_yank()
end
'';
};
}
];
}

View File

@ -0,0 +1,44 @@
{
colorschemes.catppuccin = {
enable = true;
integrations = {
cmp = true;
gitsigns = true;
harpoon = true;
neotree = true;
noice = true;
treesitter = true;
rainbow_delimiters = true;
indent_blankline = {
enabled = true;
colored_indent_levels = true;
};
};
customHighlights = ''
function(colors)
local bg1 = colors.mantle
local bg2 = colors.crust
local fg0 = colors.text
local green = colors.green
local red = colors.red
return {
TelescopePreviewBorder = { fg = bg1, bg = bg1 },
TelescopePreviewNormal = { bg = bg1 },
TelescopePreviewTitle = { fg = fg0, bg = green },
TelescopePromptBorder = { fg = bg2, bg = bg2 },
TelescopePromptNormal = { fg = fg0, bg = bg2 },
TelescopePromptPrefix = { fg = red, bg = bg2 },
TelescopePromptTitle = { fg = fg0, bg = red },
TelescopeResultsBorder = { fg = bg1, bg = bg1 },
TelescopeResultsNormal = { bg = bg1 },
TelescopeResultsTitle = { fg = bg1, bg = bg1 },
TelescopeSelection = { bg = bg2, fg = colors.text },
TelescopeResultsDiffAdd = { fg = fg0 },
TelescopeResultsDiffChange = { fg = fg0 },
TelescopeResultsDiffDelete = { fg = fg0 },
NotifyBackground = { bg = bg2 },
}
end
'';
};
}

View File

@ -0,0 +1,15 @@
{pkgs, ...}: {
imports = [
./colorscheme.nix
./options.nix
./keymaps.nix
./autocommands
./plugins
];
config = {
package = pkgs.neovim-nightly;
viAlias = true;
vimAlias = true;
};
}

View File

@ -0,0 +1,75 @@
_: {
keymaps = [
{
key = "<leader>e";
action = "<cmd>Neotree toggle<CR>";
options = {
silent = true;
};
}
{
key = "<leader>ff";
action = "<cmd>Telescope find_files<CR>";
options = {
silent = true;
};
}
{
key = "<Space>";
action = "<Nop>";
options = {
silent = true;
};
mode = ["n" "v"];
}
{
key = "<Esc>";
action = "<C-\\><C-n>";
options = {
silent = true;
};
mode = ["t"];
}
{
key = "q:";
action = "<Nop>";
options = {
noremap = true;
};
}
{
key = "k";
action = "v:count == 0 ? 'gk' : 'k'";
options = {
silent = true;
expr = true;
};
}
{
key = "j";
action = "v:count == 0 ? 'gj' : 'j'";
options = {
silent = true;
expr = true;
};
}
{
key = "<M-K>";
action = ":m -2<CR>";
}
{
key = "<M-J>";
action = ":m +1<CR>";
}
{
key = "<M-K>";
action = ":m '<-2<CR>gv=gv";
mode = ["v"];
}
{
key = "<M-J>";
action = ":m '>+1<CR>gv=gv";
mode = ["v"];
}
];
}

198
modules/nixvim/options.nix Normal file
View File

@ -0,0 +1,198 @@
{
pkgs,
lib,
...
}: let
indentSize = 4;
in {
options = {
programs.nixvim.ai = {
enable = lib.mkEnableOption "AI functions";
};
};
config = {
clipboard.register = "unnamedplus";
globals = {
mapleader = " ";
maplocalleader = ",";
inlay_hints_visible = true;
};
opts = {
termguicolors = true;
whichwrap = "b,s,<,>,[,],h,l";
backspace = "indent,eol,start";
autoindent = true;
expandtab = true;
smarttab = true;
smartindent = true;
shiftwidth = indentSize;
tabstop = indentSize;
softtabstop = indentSize;
hlsearch = true;
incsearch = true;
ignorecase = true;
smartcase = true;
scrolloff = 8;
splitbelow = true;
splitright = true;
startofline = false;
number = true;
relativenumber = true;
visualbell = true;
errorbells = false;
#textwidth = 80;
colorcolumn = [80];
cursorline = true;
undofile = true;
backup = true;
mouse = "a";
selectmode = "mouse";
mousemoveevent = true;
timeoutlen = 300;
list = true;
spell = true;
spelllang = ["de" "en_us"];
helplang = "de";
laststatus = 3;
conceallevel = 0;
concealcursor = "nc";
signcolumn = "yes";
foldlevel = 999;
};
extraPackages = with pkgs; [
fd
ripgrep
iferr
fswatch
reftools
golines
richgo
gofumpt
govulncheck
mockgen
ginkgo
gotestsum
libxcrypt
xz
icu74
alejandra
vscode-extensions.ms-vscode.cpptools
];
extraPlugins = with pkgs.vimPlugins; [
{
plugin = go-nvim;
config = ''lua require("go").setup()'';
}
{
plugin = nvim-dap-go;
config = ''lua require("dap-go").setup()'';
}
{
plugin = telescope-dap-nvim;
config = ''lua require("telescope").load_extension("dap")'';
}
];
extraConfigLua = ''
vim.opt.undodir = vim.fn.stdpath("state") .. "/undo"
vim.opt.backupdir = vim.fn.stdpath("state") .. "/backup"
vim.opt.listchars:append("eol:")
vim.opt.listchars:append("space:.")
vim.opt.listchars:append("tab:🡢 ")
vim.filetype.add({extension = { templ = "templ" }})
vim.diagnostic.config({
virtual_text = true,
severity_sort = true,
})
vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" })
vim.fn.sign_define("DiagnosticSignWarn", { text = "", texthl = "DiagnosticSignWarn" })
vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo" })
vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" })
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DapBreakpoint", linehl = "", numhl = "DapBreakpoint" })
vim.fn.sign_define(
"DapBreakpointCondition",
{ text = "", texthl = "DapBreakpoint", linehl = "", numhl = "DapBreakpoint" }
)
vim.fn.sign_define(
"DapBreakpointRejected",
{ text = "", texthl = "DapBreakpoint", linehl = "", numhl = "DapBreakpoint" }
)
vim.fn.sign_define("DapLogPoint", { text = "", texthl = "DapLogPoint", linehl = "", numhl = "DapLogPoint" })
vim.fn.sign_define("DapStopped", { text = "", texthl = "DapStopped", linehl = "", numhl = "DapStopped" })
'';
extraConfigLuaPre = ''
local colors = require("catppuccin.palettes").get_palette("mocha")
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
function get_program()
return coroutine.create(function(coro)
local opts = {}
pickers
.new(opts, {
prompt_title = "Path to executable",
finder = finders.new_oneshot_job({ "fd", "--exclude", ".git", "--no-ignore", "--type", "x"}, {}),
sorter = conf.generic_sorter(opts),
attach_mappings = function(buffer_number)
actions.select_default:replace(function()
actions.close(buffer_number)
coroutine.resume(coro, action_state.get_selected_entry()[1])
end)
return true
end,
})
:find()
end)
end
'';
extraConfigLuaPost = ''
local hooks = require("ibl.hooks")
-- create the highlight groups in the highlight setup hook, so they are reset
-- every time the colorscheme changes
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
vim.api.nvim_set_hl(0, "RainbowRed", { fg = colors.red })
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = colors.yellow })
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = colors.blue })
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = colors.peach })
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = colors.green })
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = colors.mauve })
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = colors.teal })
end)
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
local dap = require("dap")
local dapui = require("dapui")
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.after.event_initialized.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
'';
};
}

View File

@ -0,0 +1,12 @@
{
lib,
config,
...
}: let
cfg = config.programs.nixvim.ai;
in
lib.mkIf cfg.enable {
plugins.codeium-nvim = {
enable = true;
};
}

View File

@ -0,0 +1,130 @@
{pkgs, ...}: {
plugins.dap = {
enable = true;
extensions = {
dap-ui.enable = true;
dap-go.enable = true;
dap-python.enable = true;
dap-virtual-text.enable = true;
};
adapters = {
executables = {
lldb = {
command = "${pkgs.llvmPackages.lldb}/bin/lldb-vscode";
};
};
servers.codelldb = rec {
port = 13000;
executable = {
command = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
args = ["--port" (builtins.toString port)];
};
};
};
configurations = rec {
c = cpp;
rust = cpp;
cpp = [
{
name = "Launch";
request = "launch";
type = "codelldb";
cwd = "\${workspaceFolder}";
stopOnEntry = false;
runInTerminal = false;
program = {
__raw = ''
get_program
'';
};
}
{
name = "Launch with Arguments";
request = "launch";
type = "codelldb";
cwd = "\${workspaceFolder}";
stopOnEntry = false;
runInTerminal = false;
program = {
__raw = ''
get_program
'';
};
args = {
__raw = ''
function()
local arguments_string = vim.fn.input('Executable arguments: ')
return vim.split(arguments_string, " +")
end
'';
};
}
];
};
};
keymaps = [
{
action = ":DapToggleBreakpoint<CR>";
key = "<leader>db";
options = {
silent = true;
};
}
{
action = ":DapUiToggle<CR>";
key = "<leader>du";
options = {
silent = true;
};
}
{
action = ":DapContinue<CR>";
key = "<leader>dc";
options = {
silent = true;
};
}
{
action = ":DapRerun<CR>";
key = "<leader>dC";
options = {
silent = true;
};
}
{
action = ":DapStepOver<CR>";
key = "<leader>do";
options = {
silent = true;
};
}
{
action = ":DapStepIn<CR>";
key = "<leader>di";
options = {
silent = true;
};
}
{
action = ":DapStepOut<CR>";
key = "<leader>dO";
options = {
silent = true;
};
}
{
action = ":DapTerminate<CR>";
key = "<leader>dT";
options = {
silent = true;
};
}
{
action = ":DapToggleRepl<CR>";
key = "<leader>dr";
options = {
silent = true;
};
}
];
}

View File

@ -0,0 +1,26 @@
{
imports = [
./gitsigns.nix
./harpoon.nix
./indent-blankline.nix
./lualine.nix
./neo-tree.nix
./noice.nix
./none-ls.nix
./rainbow-delimiters.nix
./telescope.nix
./treesitter.nix
./trouble.nix
./vim-tmux-navigator.nix
./which-key.nix
./mini.nix
./todo-comments.nix
./neorg.nix
./fugitive.nix
./dap.nix
./lastplace.nix
./codeium.nix
./undotree.nix
./lsp
];
}

View File

@ -0,0 +1,3 @@
{
plugins.fugitive.enable = true;
}

View File

@ -0,0 +1,3 @@
{
plugins.gitsigns.enable = true;
}

View File

@ -0,0 +1,15 @@
{
plugins.harpoon = {
enable = true;
keymaps = {
addFile = "<leader>m";
navFile = {
"1" = "<leader>1";
"2" = "<leader>2";
"3" = "<leader>3";
"4" = "<leader>4";
};
toggleQuickMenu = "<leader>M";
};
};
}

View File

@ -0,0 +1,25 @@
_: let
highlight = [
"RainbowRed"
"RainbowYellow"
"RainbowBlue"
"RainbowOrange"
"RainbowGreen"
"RainbowViolet"
"RainbowCyan"
];
in {
plugins.indent-blankline = {
enable = true;
settings = {
scope = {
inherit highlight;
};
indent = {
inherit highlight;
char = "";
tab_char = "";
};
};
};
}

View File

@ -0,0 +1,3 @@
{
plugins.lastplace.enable = true;
}

View File

@ -0,0 +1,236 @@
{
plugins = {
friendly-snippets = {
enable = true;
};
luasnip = {
enable = true;
extraConfig = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
fromLua = [
{paths = ../../snippets;}
];
};
lspkind = {
enable = true;
symbolMap = {
Namespace = "󰌗";
Text = "󰉿";
Method = "󰆧";
Function = "󰆧";
Constructor = "";
Field = "󰜢";
Variable = "󰀫";
Class = "󰠱";
Interface = "";
Module = "";
Property = "󰜢";
Unit = "󰑭";
Value = "󰎠";
Enum = "";
Keyword = "󰌋";
Snippet = "";
Color = "󰏘";
File = "󰈚";
Reference = "󰈇";
Folder = "󰉋";
EnumMember = "";
Constant = "󰏿";
Struct = "󰙅";
Event = "";
Operator = "󰆕";
TypeParameter = "󰊄";
Table = "";
Object = "󰅩";
Tag = "";
Array = "[]";
Boolean = "";
Number = "";
Null = "󰟢";
String = "󰉿";
Calendar = "";
Watch = "󰥔";
Package = "";
Codeium = "";
Copilot = "";
TabNine = "";
};
};
cmp = {
enable = true;
autoEnableSources = true;
settings = {
snippet.expand = ''
function(args)
require('luasnip').lsp_expand(args.body)
end
'';
completion.completeopt = "menu,preview";
sources = [
{name = "nvim_lsp";}
{name = "nvim_lsp_signature_help";}
{name = "nvim_lsp_document_symbol";}
{name = "codeium";}
{name = "luasnip";}
{name = "path";}
{name = "buffer";}
{name = "treesitter";}
];
mapping = {
__raw = ''
cmp.mapping.preset.insert({
['<C-n>'] = cmp.mapping({
c = function()
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
vim.api.nvim_feedkeys(t('<Down>'), 'n', true)
end
end,
i = function(fallback)
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
fallback()
end
end
}),
['<C-p>'] = cmp.mapping({
c = function()
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
else
vim.api.nvim_feedkeys(t('<Up>'), 'n', true)
end
end,
i = function(fallback)
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
else
fallback()
end
end
}),
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), {'i', 'c'}),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), {'i', 'c'}),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}),
['<C-e>'] = cmp.mapping({ i = cmp.mapping.close(), c = cmp.mapping.close() }),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<Down>'] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), {'i'}),
['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), {'i'}),
["<Tab>"] = cmp.mapping({
c = function()
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Insert })
else
cmp.complete()
end
end,
i = function(fallback)
local has_words_before = function()
local unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
if cmp.visible() then
cmp.select_next_item()
elseif require('luasnip').expand_or_jumpable() then
require('luasnip').expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end,
s = function(fallback)
local has_words_before = function()
local unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
if cmp.visible() then
cmp.select_next_item()
elseif require('luasnip').expand_or_jumpable() then
require('luasnip').expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end
}),
["<S-Tab>"] = cmp.mapping({
c = function()
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Insert })
else
cmp.complete()
end
end,
i = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require('luasnip').jumpable(-1) then
require('luasnip').jump(-1)
else
fallback()
end
end,
s = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require('luasnip').jumpable(-1) then
require('luasnip').jump(-1)
else
fallback()
end
end
}),
})
'';
};
};
cmdline = {
"/" = {
sources = [
{
name = "buffer";
}
];
};
":" = {
sources = [
{
name = "path";
}
{
name = "cmdline";
}
];
};
"?" = {
mapping = {
completion.completeopt = "menuone,noselect";
__raw = "cmp.mapping.preset.cmdline({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
})";
};
sources = [
{
name = "cmdline";
ignoreCmds = [
"Man"
"!"
];
}
];
};
};
};
};
}

View File

@ -0,0 +1,7 @@
{
imports = [
./languages
./cmp.nix
./lsp.nix
];
}

Some files were not shown because too many files have changed in this diff Show More