Compare commits
293 commits
Author | SHA1 | Date | |
---|---|---|---|
Marko Korhonen | f4a9b01114 | ||
Marko Korhonen | 3655087f63 | ||
Marko Korhonen | 0f215d106c | ||
Marko Korhonen | 4bade97832 | ||
Marko Korhonen | f73a509ae3 | ||
Marko Korhonen | 0610df9908 | ||
Marko Korhonen | becfcc4968 | ||
Marko Korhonen | b5e1c7c2d1 | ||
Marko Korhonen | e709911b6a | ||
Marko Korhonen | 876cb45c37 | ||
Marko Korhonen | 40030e646c | ||
Marko Korhonen | ff510d3b02 | ||
Marko Korhonen | 9760f03c00 | ||
Marko Korhonen | 4bbafb42ff | ||
Marko Korhonen | 81f884a376 | ||
Marko Korhonen | 62b3656bd9 | ||
Marko Korhonen | 826190284c | ||
Marko Korhonen | 903814b4b2 | ||
Marko Korhonen | 2d005a7ecc | ||
Marko Korhonen | 46bfe47494 | ||
Marko Korhonen | 5aa759126b | ||
Marko Korhonen | 56c1cdd3c1 | ||
Marko Korhonen | 9e076ed63a | ||
Marko Korhonen | 647293c28c | ||
Marko Korhonen | 5dc717534c | ||
Marko Korhonen | a148d7b230 | ||
Marko Korhonen | dab59d2f70 | ||
Marko Korhonen | a919e656c8 | ||
Marko Korhonen | 879cfda68e | ||
Marko Korhonen | b7a0e83e5a | ||
Marko Korhonen | 442bee9014 | ||
Marko Korhonen | b548817e9f | ||
Marko Korhonen | c2cb934522 | ||
Marko Korhonen | 1c47bedc93 | ||
Marko Korhonen | 388d23663c | ||
Marko Korhonen | 5813fc3d54 | ||
Marko Korhonen | 300a7fd450 | ||
Marko Korhonen | 4c680ddd88 | ||
Marko Korhonen | 5746b48fd2 | ||
Marko Korhonen | 4a57c108a2 | ||
Marko Korhonen | 734f5a5d5a | ||
Marko Korhonen | 7b0fc6c2d0 | ||
Marko Korhonen | 80f862dcb9 | ||
Marko Korhonen | 46530854fe | ||
Marko Korhonen | c5ae7d9063 | ||
Marko Korhonen | 3e13fb2b67 | ||
Marko Korhonen | e53d504a94 | ||
Marko Korhonen | fd1103f45b | ||
Marko Korhonen | b433d22bfe | ||
Marko Korhonen | 0882106bc5 | ||
Marko Korhonen | 33816bdea5 | ||
Marko Korhonen | 617f59dbd5 | ||
Marko Korhonen | b5c1a1399b | ||
Marko Korhonen | ee3f962386 | ||
Marko Korhonen | 13b51fbbb6 | ||
Marko Korhonen | 4bbfa49d6f | ||
Marko Korhonen | a6c9da019f | ||
Marko Korhonen | 34f995747d | ||
Marko Korhonen | 5a17f8b9ec | ||
Marko Korhonen | 269ce725ea | ||
Marko Korhonen | 382bfad14c | ||
Marko Korhonen | 557eeb705d | ||
Marko Korhonen | ff57f88c5b | ||
Marko Korhonen | 064c285fcf | ||
Marko Korhonen | 944de98b4a | ||
Marko Korhonen | ee97d8a590 | ||
Marko Korhonen | c1ff9d997b | ||
Marko Korhonen | 19b5407a9a | ||
Marko Korhonen | f738678bd5 | ||
Marko Korhonen | 6e62a73c1f | ||
Marko Korhonen | b4bab18019 | ||
Marko Korhonen | 292fc39d06 | ||
Marko Korhonen | 10387603f3 | ||
Marko Korhonen | 9662b7aba6 | ||
Marko Korhonen | 1217ee010b | ||
Marko Korhonen | 85ff12a696 | ||
Marko Korhonen | 21d6a1c3f6 | ||
Marko Korhonen | 29e38f7284 | ||
Marko Korhonen | 634634ea27 | ||
Marko Korhonen | 5561023ea8 | ||
Marko Korhonen | cebd82df87 | ||
Marko Korhonen | 610ec4c697 | ||
Marko Korhonen | 3a1d38a693 | ||
Marko Korhonen | ab262abe66 | ||
Marko Korhonen | 8b6dbcf1c8 | ||
Marko Korhonen | 0db7729c53 | ||
Marko Korhonen | 0e72be4d93 | ||
Marko Korhonen | 81ddde9555 | ||
Marko Korhonen | 5126176e6b | ||
Marko Korhonen | 67c89f349e | ||
Marko Korhonen | 544fcbfdf4 | ||
Marko Korhonen | 6d5a7a3ee0 | ||
Marko Korhonen | e54c621cda | ||
Marko Korhonen | 49da6bd829 | ||
Marko Korhonen | d764006143 | ||
Marko Korhonen | 80d983447c | ||
Marko Korhonen | e3e9848d0e | ||
Marko Korhonen | 22a4aad249 | ||
Marko Korhonen | ff12fbbe55 | ||
Marko Korhonen | 845f4024df | ||
Marko Korhonen | f9b7a93570 | ||
Marko Korhonen | d09821e863 | ||
Marko Korhonen | db73442b8b | ||
Marko Korhonen | 08aa9907c7 | ||
Marko Korhonen | 66c7fe059e | ||
Marko Korhonen | 30110372aa | ||
Marko Korhonen | 66fede355d | ||
Marko Korhonen | 8397e9b693 | ||
Marko Korhonen | e6531057d5 | ||
Marko Korhonen | bf5ee22cbb | ||
Marko Korhonen | 1ef87cba6c | ||
Marko Korhonen | 2998b2d336 | ||
Marko Korhonen | 8c533276a1 | ||
Marko Korhonen | 8ba0dded9b | ||
Marko Korhonen | be0452583c | ||
Marko Korhonen | 59cac76657 | ||
Marko Korhonen | 25d531a401 | ||
Marko Korhonen | c5b2c6e24a | ||
Marko Korhonen | 726ab946b0 | ||
Marko Korhonen | 468cc65e27 | ||
Marko Korhonen | 8eed2f76b5 | ||
Marko Korhonen | f390929f7a | ||
Marko Korhonen | c5d835612a | ||
Marko Korhonen | 917491744b | ||
Marko Korhonen | 7e33569675 | ||
Marko Korhonen | 54487584a4 | ||
Marko Korhonen | c6fedc99f0 | ||
Marko Korhonen | fa8e7df59d | ||
Marko Korhonen | e6b6534c8d | ||
Marko Korhonen | 1ce80c1347 | ||
Marko Korhonen | b570b8a075 | ||
Marko Korhonen | 9e591464ce | ||
Marko Korhonen | d2112451a7 | ||
Marko Korhonen | 0982ebf334 | ||
Marko Korhonen | 68a73c417e | ||
Marko Korhonen | 71cfebbf64 | ||
Marko Korhonen | 024fad6baf | ||
Marko Korhonen | ef0c42e610 | ||
Marko Korhonen | 406e8e2bbc | ||
Marko Korhonen | d90a73ab5a | ||
Marko Korhonen | cfb08c8ebd | ||
Marko Korhonen | 4c63f9ac60 | ||
Marko Korhonen | 5d47465266 | ||
Marko Korhonen | f4c7e18482 | ||
Marko Korhonen | 6de4b65ab8 | ||
Marko Korhonen | 2b038e4b0d | ||
Marko Korhonen | d9372d30bb | ||
Marko Korhonen | e838e78ad8 | ||
Marko Korhonen | 83cd0a7540 | ||
Marko Korhonen | b3ebda5b51 | ||
Marko Korhonen | c6876f5f9a | ||
Marko Korhonen | 9c2f5dee4c | ||
Marko Korhonen | fc50b07d4e | ||
Marko Korhonen | eefc9c4a60 | ||
Marko Korhonen | 7882ab1922 | ||
Marko Korhonen | cbee7ac985 | ||
Marko Korhonen | 5024f14d82 | ||
Marko Korhonen | bcd1f2553e | ||
Marko Korhonen | a650d003b1 | ||
Marko Korhonen | 61577153be | ||
Marko Korhonen | 769fcf82ef | ||
Marko Korhonen | 168742d109 | ||
Marko Korhonen | 8b3cf79112 | ||
Marko Korhonen | 4004dc5df6 | ||
Marko Korhonen | 0ced314c90 | ||
Marko Korhonen | 902c397e8b | ||
Marko Korhonen | 4c256d4b37 | ||
Marko Korhonen | d07aa82cda | ||
Marko Korhonen | 88da85e368 | ||
Marko Korhonen | 6c6ce53837 | ||
Marko Korhonen | 92ab50ddfc | ||
Marko Korhonen | 6489b1094e | ||
Marko Korhonen | c99903e78e | ||
Marko Korhonen | ad3d734adc | ||
Marko Korhonen | 455a008f06 | ||
Marko Korhonen | 4442252c65 | ||
Marko Korhonen | 312d755740 | ||
Marko Korhonen | 8174254bc0 | ||
Marko Korhonen | 0e71bad9d2 | ||
Marko Korhonen | dda94cb793 | ||
Marko Korhonen | e8667d3c98 | ||
Marko Korhonen | 7fccc55151 | ||
Marko Korhonen | 8929c69dd8 | ||
Marko Korhonen | a67ad971ea | ||
Marko Korhonen | 070b0a706f | ||
Marko Korhonen | a2565ab5a8 | ||
Marko Korhonen | 1e693490d2 | ||
Marko Korhonen | f633456d02 | ||
Marko Korhonen | 1ae405e85d | ||
Marko Korhonen | 49f03b0e06 | ||
Marko Korhonen | 6a5f536b13 | ||
Marko Korhonen | 23d21a6c8b | ||
Marko Korhonen | 69ff724b5a | ||
Marko Korhonen | b33b409336 | ||
Marko Korhonen | 7455165138 | ||
Marko Korhonen | 72e68f8af9 | ||
Marko Korhonen | d0691c78b1 | ||
Marko Korhonen | 140991b8ae | ||
Marko Korhonen | 3a556610f7 | ||
Marko Korhonen | 8a3fb3ad45 | ||
Marko Korhonen | 747b4b8990 | ||
Marko Korhonen | b36e9f5393 | ||
Marko Korhonen | 2a6e453156 | ||
Marko Korhonen | b7c627490b | ||
Marko Korhonen | bd7c5020f9 | ||
Marko Korhonen | 38097407cd | ||
Marko Korhonen | 2cd94ee65f | ||
Marko Korhonen | 71b2b12a3f | ||
Marko Korhonen | d630e712a3 | ||
Marko Korhonen | 3adda7b513 | ||
Marko Korhonen | 8ceed71fb1 | ||
Marko Korhonen | a3d930033c | ||
Marko Korhonen | 39b2a945bb | ||
Marko Korhonen | 03918c79cd | ||
Marko Korhonen | 1cf475d7ee | ||
Marko Korhonen | b3fcfdb3e8 | ||
Marko Korhonen | f6197e8eca | ||
Marko Korhonen | 96873e1bd7 | ||
Marko Korhonen | 243f8caaab | ||
Marko Korhonen | af6c34baaa | ||
Marko Korhonen | bf072046bf | ||
Marko Korhonen | 794e1b9d5c | ||
Marko Korhonen | f3dc5ebd34 | ||
Marko Korhonen | 5d998c8138 | ||
Marko Korhonen | c9f95761bb | ||
Marko Korhonen | 098f21d4ba | ||
Marko Korhonen | fae3572178 | ||
Marko Korhonen | 1b53619a47 | ||
Marko Korhonen | 85203e7811 | ||
Marko Korhonen | 8cf22d17f8 | ||
Marko Korhonen | 958178ca85 | ||
Marko Korhonen | 42c79e8d65 | ||
Marko Korhonen | e6b348bda0 | ||
Marko Korhonen | a489d13bf0 | ||
Marko Korhonen | 0e8d8d3160 | ||
Marko Korhonen | 97438e63cb | ||
Marko Korhonen | 81b0abe8d1 | ||
Marko Korhonen | 67ddd73085 | ||
Marko Korhonen | 300da07721 | ||
Marko Korhonen | 4f655af6da | ||
Marko Korhonen | e0a026afb3 | ||
Marko Korhonen | db136a7313 | ||
Marko Korhonen | e156b28843 | ||
Marko Korhonen | 3a8a2e2d76 | ||
Marko Korhonen | ac829ff2a0 | ||
Marko Korhonen | d4dedd038f | ||
Marko Korhonen | dbd364d9c6 | ||
Marko Korhonen | 465841dc25 | ||
Marko Korhonen | c5b4cd5ff4 | ||
Marko Korhonen | 52d76d6be5 | ||
Marko Korhonen | 7c5f21daba | ||
Marko Korhonen | 2f9bc0ae5f | ||
Marko Korhonen | 82d7b1fbca | ||
Marko Korhonen | 5a4174e2d0 | ||
Marko Korhonen | e2eb38516b | ||
Marko Korhonen | 4e59e69155 | ||
Marko Korhonen | 6e7520280e | ||
Marko Korhonen | 7a1dc197e1 | ||
Marko Korhonen | cda6ed5835 | ||
Marko Korhonen | 3ea12285b7 | ||
Marko Korhonen | 55a9462ad0 | ||
Marko Korhonen | 4b0cafdc04 | ||
Marko Korhonen | 208688e092 | ||
Marko Korhonen | 9513b9c009 | ||
Marko Korhonen | a3d4442aeb | ||
Marko Korhonen | b28bef4c89 | ||
Marko Korhonen | 1bb97d06a6 | ||
Marko Korhonen | bc9ef5a1cd | ||
Marko Korhonen | 4b8c40073e | ||
Marko Korhonen | 8982e0c439 | ||
Marko Korhonen | 8804b5a2bf | ||
Marko Korhonen | 972043dcae | ||
Marko Korhonen | fa7b53d41f | ||
Marko Korhonen | dab116c936 | ||
Marko Korhonen | 05120e4507 | ||
Marko Korhonen | fdc9eb668d | ||
Marko Korhonen | b2cd7e23dc | ||
Marko Korhonen | ac671aabf0 | ||
Marko Korhonen | 431cfeacb4 | ||
Marko Korhonen | fc93090a36 | ||
Marko Korhonen | b362cc511b | ||
Marko Korhonen | 17c1d739c2 | ||
Marko Korhonen | 4e6d402070 | ||
Marko Korhonen | 902fe31a7f | ||
Marko Korhonen | 7051045942 | ||
Marko Korhonen | 4af284427f | ||
Marko Korhonen | 3b20556fb7 | ||
Marko Korhonen | 1bb484443b | ||
Marko Korhonen | f795a49720 | ||
Marko Korhonen | 4c1f264e2a | ||
Marko Korhonen | eb1321303c | ||
Marko Korhonen | cacf752385 | ||
Marko Korhonen | 219d5c7633 |
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "dotdrop"]
|
||||
path = dotdrop
|
||||
url = https://github.com/deadc0de6/dotdrop.git
|
|
@ -1,2 +1,3 @@
|
|||
package-lock.json
|
||||
lazy-lock.json
|
||||
dotdrop/
|
||||
|
|
21
LICENSE
21
LICENSE
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Marko Korhonen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
14
LICENSE.adoc
Normal file
14
LICENSE.adoc
Normal file
|
@ -0,0 +1,14 @@
|
|||
== The MIT License (MIT)
|
||||
|
||||
Copyright (c) {localyear} Marko Korhonen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”),
|
||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -95,10 +95,6 @@ src = "etc/ssh/sshd_config"
|
|||
dst = "/etc/welcomemessage.conf"
|
||||
src = "etc/welcomemessage.conf"
|
||||
|
||||
[dotfiles."f_getty6conf"]
|
||||
src = "etc/systemd/system/getty@tty6.service.d/override.conf"
|
||||
dst = "/etc/systemd/system/getty@tty6.service.d/override.conf"
|
||||
|
||||
[dotfiles."f_99-conbee-usb-serial.rules"]
|
||||
src = "etc/udev/rules.d/99-conbee-usb-serial.rules"
|
||||
dst = "/etc/udev/rules.d/99-conbee-usb-serial.rules"
|
||||
|
@ -151,10 +147,6 @@ dst = "/etc/mkinitcpio.d/linux.preset"
|
|||
src = "etc/mkinitcpio.d/linux-cachyos.preset"
|
||||
dst = "/etc/mkinitcpio.d/linux-cachyos.preset"
|
||||
|
||||
[dotfiles."f_mkinitcpio_linux-zen.preset"]
|
||||
src = "etc/mkinitcpio.d/linux-zen.preset"
|
||||
dst = "/etc/mkinitcpio.d/linux-zen.preset"
|
||||
|
||||
[dotfiles.f_cmdline]
|
||||
src = "etc/kernel/cmdline"
|
||||
dst = "/etc/kernel/cmdline"
|
||||
|
@ -171,8 +163,9 @@ dst = "/etc/sudoers.d/pacman"
|
|||
src = "etc/doas.conf"
|
||||
dst = "/etc/doas.conf"
|
||||
|
||||
[profiles.Network]
|
||||
dotfiles = ["d_network", "f_networkd.conf"]
|
||||
[dotfiles."f_flexo.toml"]
|
||||
src = "etc/flexo/flexo.toml"
|
||||
dst = "/etc/flexo/flexo.toml"
|
||||
|
||||
[profiles.Locale]
|
||||
dotfiles = ["f_locale.conf", "f_locale.gen"]
|
||||
|
@ -209,24 +202,29 @@ dotfiles = [
|
|||
"f_system.conf",
|
||||
"f_timesyncd.conf",
|
||||
"f_welcomemessage.conf",
|
||||
"f_flexo.toml",
|
||||
]
|
||||
include = ["Locale", "Pacman", "Network"]
|
||||
include = ["Locale", "Pacman"]
|
||||
|
||||
[profiles.Moria]
|
||||
include = ["Locale", "Pacman", "Network"]
|
||||
include = ["Locale", "Pacman"]
|
||||
dotfiles = [
|
||||
"f_99-sysctl.conf",
|
||||
"f_cmdline",
|
||||
"f_cpupower",
|
||||
"f_doas.conf",
|
||||
"f_adb.service",
|
||||
"f_mkinitcpio.conf",
|
||||
"f_mkinitcpio_linux.preset",
|
||||
"f_mkinitcpio_linux-cachyos.preset",
|
||||
"f_plymouthd.conf",
|
||||
"f_sshd_config",
|
||||
"f_getty6conf",
|
||||
"f_flexo.toml",
|
||||
]
|
||||
|
||||
[profiles.Tirion]
|
||||
dotfiles = ["f_doas.conf", "f_ignore", "f_sshd_config"]
|
||||
|
||||
[profiles.Gondor]
|
||||
include = ["Locale", "Pacman"]
|
||||
dotfiles = ["f_doas.conf", "f_sshd_config"]
|
||||
|
@ -238,4 +236,4 @@ include = ["Locale"]
|
|||
include = ["Pacman"]
|
||||
|
||||
[profiles.mko-laptop]
|
||||
dotfiles = ["f_cpupower", "f_yubikey_udev.rules", "f_doas.conf"]
|
||||
dotfiles = ["f_cpupower", "f_doas.conf", "f_timesyncd.conf"]
|
||||
|
|
182
config.toml
182
config.toml
|
@ -1,5 +1,8 @@
|
|||
#:schema ../../dotdrop-config-schema.json
|
||||
|
||||
[actions]
|
||||
dconf-load = "dconf load / < ~/.config/dconf.ini"
|
||||
kanagawa-compile = "vim +KanagawaCompile +qa"
|
||||
|
||||
[config]
|
||||
backup = true
|
||||
|
@ -22,46 +25,16 @@ src = ".config/systemd/user"
|
|||
dst = "~/.config/mpv"
|
||||
src = ".config/mpv"
|
||||
|
||||
[dotfiles.d_neomutt]
|
||||
dst = "~/.config/neomutt"
|
||||
src = ".config/neomutt"
|
||||
|
||||
[dotfiles.d_imapnotify]
|
||||
dst = "~/.config/imapnotify"
|
||||
src = ".config/imapnotify"
|
||||
|
||||
[dotfiles.d_nvim]
|
||||
dst = "~/.config/nvim"
|
||||
src = ".config/nvim"
|
||||
|
||||
[dotfiles.d_rofi]
|
||||
dst = "~/.config/rofi"
|
||||
src = ".config/rofi"
|
||||
|
||||
[dotfiles.d_sway]
|
||||
dst = "~/.config/sway"
|
||||
src = ".config/sway"
|
||||
|
||||
[dotfiles.d_waybar]
|
||||
dst = "~/.config/waybar"
|
||||
src = ".config/waybar"
|
||||
|
||||
[dotfiles.d_wofi]
|
||||
src = ".config/wofi"
|
||||
dst = "~/.config/wofi"
|
||||
actions = ["kanagawa-compile"]
|
||||
instignore = ["*-lock.json"]
|
||||
|
||||
[dotfiles."f_abcde.conf"]
|
||||
dst = "~/.abcde.conf"
|
||||
src = ".abcde.conf"
|
||||
|
||||
[dotfiles.f_mbsyncrc]
|
||||
dst = "~/.mbsyncrc"
|
||||
src = ".mbsyncrc"
|
||||
|
||||
[dotfiles."f_alacritty.yml"]
|
||||
dst = "~/.config/alacritty/alacritty.yml"
|
||||
src = ".config/alacritty/alacritty.yml"
|
||||
|
||||
[dotfiles.d_ssh]
|
||||
dst = "~/.ssh"
|
||||
src = ".ssh"
|
||||
|
@ -74,38 +47,18 @@ src = ".config/beets/config.yaml"
|
|||
dst = "~/.config/beets/whitelist"
|
||||
src = ".config/beets/whitelist"
|
||||
|
||||
[dotfiles.f_bspwmrc]
|
||||
dst = "~/.config/bspwm/bspwmrc"
|
||||
src = ".config/bspwm/bspwmrc"
|
||||
|
||||
[dotfiles.f_gitconfig]
|
||||
dst = "~/.config/git/config"
|
||||
src = ".config/git/config"
|
||||
|
||||
[dotfiles.f_libra_config]
|
||||
dst = "~/.config/libra/config.toml"
|
||||
src = ".config/libra/config.toml"
|
||||
|
||||
[dotfiles.f_librewolf_overrides]
|
||||
dst = "~/.librewolf/librewolf.overrides.cfg"
|
||||
src = ".librewolf/librewolf.overrides.cfg"
|
||||
|
||||
[dotfiles.f_mailcap]
|
||||
dst = "~/.mailcap"
|
||||
src = ".mailcap"
|
||||
|
||||
[dotfiles."f_makepkg.conf"]
|
||||
dst = "~/.config/pacman/makepkg.conf"
|
||||
src = ".config/pacman/makepkg.conf"
|
||||
|
||||
[dotfiles.f_mako_config]
|
||||
dst = "~/.config/mako/config"
|
||||
src = ".config/mako/config"
|
||||
|
||||
[dotfiles."f_mimeo_associations.txt"]
|
||||
dst = "~/.config/mimeo/associations.txt"
|
||||
src = ".config/mimeo/associations.txt"
|
||||
|
||||
[dotfiles."f_mpd.conf"]
|
||||
dst = "~/.config/mpd/mpd.conf"
|
||||
src = ".config/mpd/mpd.conf"
|
||||
|
@ -114,10 +67,6 @@ src = ".config/mpd/mpd.conf"
|
|||
dst = "~/.config/mpDris2/mpDris2.conf"
|
||||
src = ".config/mpDris2/mpDris2.conf"
|
||||
|
||||
[dotfiles."f_mpdscribble.conf"]
|
||||
dst = "~/.mpdscribble/mpdscribble.conf"
|
||||
src = ".mpdscribble/mpdscribble.conf"
|
||||
|
||||
[dotfiles.f_ncmpcpp_bindings]
|
||||
dst = "~/.config/ncmpcpp/bindings"
|
||||
src = ".config/ncmpcpp/bindings"
|
||||
|
@ -130,38 +79,10 @@ src = ".config/ranger/rc.conf"
|
|||
dst = "~/.config/ranger/commands.py"
|
||||
src = ".config/ranger/commands.py"
|
||||
|
||||
[dotfiles."f_redshift.conf"]
|
||||
dst = "~/.config/redshift/redshift.conf"
|
||||
src = ".config/redshift/redshift.conf"
|
||||
|
||||
[dotfiles."f_rtv.cfg"]
|
||||
dst = "~/.config/rtv/rtv.cfg"
|
||||
src = ".config/rtv/rtv.cfg"
|
||||
|
||||
[dotfiles."f_ssh.conf"]
|
||||
dst = "~/.ssh/config"
|
||||
src = ".ssh/config"
|
||||
|
||||
[dotfiles."f_steam-native.desktop"]
|
||||
dst = "~/.local/share/applications/steam-native.desktop"
|
||||
src = ".local/share/applications/steam-native.desktop"
|
||||
|
||||
[dotfiles."f_tdesktop_lang.strings"]
|
||||
dst = "~/.config/telegram-desktop/lang.strings"
|
||||
src = ".config/telegram-desktop/lang.strings"
|
||||
|
||||
[dotfiles."f_tmux.conf"]
|
||||
dst = "~/.tmux.conf"
|
||||
src = ".tmux.conf"
|
||||
|
||||
[dotfiles.f_youtube-dl_config]
|
||||
dst = "~/.config/youtube-dl/config"
|
||||
src = ".config/youtube-dl/config"
|
||||
|
||||
[dotfiles.d_zathura]
|
||||
dst = "~/.config/zathura"
|
||||
src = ".config/zathura"
|
||||
|
||||
[dotfiles.f_zprofile]
|
||||
dst = "~/.zprofile"
|
||||
src = ".zprofile"
|
||||
|
@ -194,10 +115,6 @@ dst = "~/.hushlogin"
|
|||
src = ".config/paru/paru.conf"
|
||||
dst = "~/.config/paru/paru.conf"
|
||||
|
||||
[dotfiles.f_msmtp_config]
|
||||
src = ".config/msmtp/config"
|
||||
dst = "~/.config/msmtp/config"
|
||||
|
||||
[dotfiles."f_foot.ini"]
|
||||
src = ".config/foot/foot.ini"
|
||||
dst = "~/.config/foot/foot.ini"
|
||||
|
@ -227,10 +144,6 @@ dst = "~/.config/electron12-flags.conf"
|
|||
src = ".pam_environment"
|
||||
dst = "~/.pam_environment"
|
||||
|
||||
[dotfiles.d_wal]
|
||||
src = ".config/wal"
|
||||
dst = "~/.config/wal"
|
||||
|
||||
[dotfiles."f_dconf.ini"]
|
||||
src = ".config/dconf.ini"
|
||||
dst = "~/.config/dconf.ini"
|
||||
|
@ -241,57 +154,43 @@ src = ".docker/config.json"
|
|||
dst = "~/.docker/config.json"
|
||||
chmod = "600"
|
||||
|
||||
[dotfiles.f_npmrc]
|
||||
src = ".npmrc"
|
||||
dst = "~/.npmrc"
|
||||
chmod = "600"
|
||||
|
||||
[dotfiles.f_zellij]
|
||||
src = ".config/zellij/config.kdl"
|
||||
dst = "~/.config/zellij/config.kdl"
|
||||
|
||||
[profiles.pacman]
|
||||
dotfiles = ["f_makepkg.conf", "f_paru.conf"]
|
||||
|
||||
[profiles.terminal]
|
||||
dotfiles = [
|
||||
"d_wal",
|
||||
"d_nvim",
|
||||
"d_ssh",
|
||||
"d_zsh",
|
||||
"f_alacritty.yml",
|
||||
"f_gitconfig",
|
||||
"f_hushlogin",
|
||||
"f_ignore",
|
||||
"f_mailcap",
|
||||
"f_ranger.conf",
|
||||
"f_ranger_commands.py",
|
||||
"f_rtv.cfg",
|
||||
"f_tmux.conf",
|
||||
"f_zellij",
|
||||
"f_zshrc",
|
||||
"f_npmrc",
|
||||
]
|
||||
|
||||
[profiles.email]
|
||||
dotfiles = ["d_neomutt", "d_imapnotify", "f_mbsyncrc", "f_msmtp_config"]
|
||||
|
||||
[profiles.media]
|
||||
dotfiles = [
|
||||
"d_mpv",
|
||||
"f_abcde.conf",
|
||||
"f_beets_config",
|
||||
"f_beets_whitelist",
|
||||
"f_libra_config",
|
||||
"f_mpd.conf",
|
||||
"f_mpdris2.conf",
|
||||
"f_mpdscribble.conf",
|
||||
"f_ncmpcpp.conf",
|
||||
"f_ncmpcpp_bindings",
|
||||
"f_youtube-dl_config",
|
||||
]
|
||||
|
||||
[profiles.sway]
|
||||
dotfiles = [
|
||||
"d_sway",
|
||||
"d_waybar",
|
||||
"d_wofi",
|
||||
"d_zathura",
|
||||
"f_electron-flags.conf",
|
||||
"f_electron12-flags.conf",
|
||||
"f_fonts.conf",
|
||||
"f_foot.ini",
|
||||
"f_mako_config",
|
||||
"f_redshift.conf",
|
||||
]
|
||||
|
||||
[profiles.gpg]
|
||||
|
@ -303,51 +202,62 @@ dotfiles = [
|
|||
]
|
||||
|
||||
[profiles.Mirkwood]
|
||||
include = ["pacman", "terminal", "email", "media", "sway", "gpg"]
|
||||
include = ["pacman", "terminal", "media", "gpg"]
|
||||
dotfiles = [
|
||||
"d_rofi",
|
||||
"f_librewolf_overrides",
|
||||
"f_dconf.ini",
|
||||
"f_docker-config.json",
|
||||
"f_fonts.conf",
|
||||
"f_foot.ini",
|
||||
]
|
||||
|
||||
[profiles.Mirkwood.variables]
|
||||
wayland = true
|
||||
|
||||
[profiles.Moria]
|
||||
include = ["pacman", "terminal", "media", "gpg"]
|
||||
dotfiles = ["f_librewolf_overrides", "f_dconf.ini", "f_zprofile"]
|
||||
dotfiles = [
|
||||
"f_librewolf_overrides",
|
||||
"f_dconf.ini",
|
||||
"f_zprofile",
|
||||
"f_fonts.conf",
|
||||
"d_systemd",
|
||||
]
|
||||
|
||||
[profiles.Moria.variables]
|
||||
wayland = true
|
||||
|
||||
[profiles.Tirion]
|
||||
include = ["terminal", "gpg"]
|
||||
|
||||
[profiles.Gondor]
|
||||
include = ["pacman", "terminal"]
|
||||
|
||||
[profiles.mko-laptop]
|
||||
include = ["terminal", "media", "gpg"]
|
||||
dotfiles = ["f_librewolf_overrides", "f_dconf.ini"]
|
||||
dotfiles = ["f_librewolf_overrides", "f_dconf.ini", "d_systemd"]
|
||||
|
||||
[profiles.mko-laptop.variables]
|
||||
wayland = true
|
||||
scale_factor = 1.25
|
||||
|
||||
[profiles.Isengard]
|
||||
include = ["terminal"]
|
||||
|
||||
[profiles.Isengard.variables]
|
||||
distro_id = "termux"
|
||||
|
||||
[profiles.Edoras]
|
||||
include = ["terminal"]
|
||||
|
||||
[profiles.TakamakiPC]
|
||||
include = ["terminal"]
|
||||
|
||||
[profiles.TakamakiPC.variables]
|
||||
wayland = false
|
||||
|
||||
[profiles.localhost]
|
||||
include = ["terminal"]
|
||||
|
||||
[profiles.ViiruJaTeippi]
|
||||
include = ["terminal"]
|
||||
|
||||
[profiles.Mirkwood.variables]
|
||||
wayland = true
|
||||
|
||||
[profiles.Moria.variables]
|
||||
wayland = true
|
||||
|
||||
[profiles.mko-laptop.variables]
|
||||
wayland = true
|
||||
|
||||
[profiles.Isengard.variables]
|
||||
distro_id = "termux"
|
||||
|
||||
[profiles.TakamakiPC.variables]
|
||||
wayland = false
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
[volumes]
|
||||
redis = {}
|
||||
media = {}
|
||||
custom_templates = {}
|
||||
geoip = {}
|
||||
backups = {}
|
||||
|
||||
[services.redis]
|
||||
image = "redis:alpine"
|
||||
container_name = "authentik-redis"
|
||||
networks = ["authentik"]
|
||||
restart = "unless-stopped"
|
||||
volumes = ["/docker/authentik/redis:/data"]
|
||||
volumes = ["redis:/data"]
|
||||
|
||||
[services.redis.healthcheck]
|
||||
test = ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
||||
|
@ -18,25 +25,12 @@ container_name = "authentik"
|
|||
restart = "unless-stopped"
|
||||
command = "server"
|
||||
volumes = [
|
||||
"/docker/authentik/media:/media",
|
||||
"/docker/authentik/custom-templates:/templates",
|
||||
"/docker/authentik/geoip:/geoip",
|
||||
"media:/media",
|
||||
"custom_templates:/templates",
|
||||
"geoip:/geoip",
|
||||
]
|
||||
env_file = [".env"]
|
||||
networks = ["authentik", "postgres", "proxy"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.authentik-redirect.entrypoints=http",
|
||||
"traefik.http.routers.authentik-redirect.rule=Host(`sso.korhonen.cc`)",
|
||||
"traefik.http.routers.authentik-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.authentik.entrypoints=https",
|
||||
"traefik.http.routers.authentik.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.authentik-rtr-outpost.rule=HostRegexp(`{subdomain:[a-z0-9-]+}.korhonen.cc`) && PathPrefix(`/outpost.goauthentik.io/`)",
|
||||
"traefik.http.routers.authentik.rule=Host(`sso.korhonen.cc`)",
|
||||
"traefik.http.routers.authentik.service=authentik",
|
||||
"traefik.http.services.authentik.loadbalancer.server.port=9000",
|
||||
]
|
||||
|
||||
[services.worker]
|
||||
image = "ghcr.io/goauthentik/server"
|
||||
|
@ -45,10 +39,10 @@ restart = "unless-stopped"
|
|||
command = "worker"
|
||||
user = "root"
|
||||
volumes = [
|
||||
"/docker/authentik/backups:/backups",
|
||||
"/docker/authentik/custom-templates:/templates",
|
||||
"/docker/authentik/geoip:/geoip",
|
||||
"/docker/authentik/media:/media",
|
||||
"backups:/backups",
|
||||
"custom_templates:/templates",
|
||||
"geoip:/geoip",
|
||||
"media:/media",
|
||||
"/var/run/docker.sock:/var/run/docker.sock",
|
||||
]
|
||||
env_file = [".env"]
|
||||
|
@ -59,7 +53,7 @@ image = "maxmindinc/geoipupdate"
|
|||
container_name = "authentik-geoipupdate"
|
||||
restart = "unless-stopped"
|
||||
networks = ["authentik"]
|
||||
volumes = ["/docker/authentik/geoip:/usr/share/GeoIP"]
|
||||
volumes = ["geoip:/usr/share/GeoIP"]
|
||||
env_file = [".env"]
|
||||
|
||||
[services.geoipupdate.environment]
|
||||
|
@ -73,19 +67,6 @@ restart = "unless-stopped"
|
|||
security_opt = ["no-new-privileges:true"]
|
||||
networks = ["proxy"]
|
||||
environment = ["TZ"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.whoami-test-redirect.entrypoints=http",
|
||||
"traefik.http.routers.whoami-test-redirect.rule=Host(`whoami-test.korhonen.cc`)",
|
||||
"traefik.http.routers.whoami-test-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.whoami-test.entrypoints=https",
|
||||
"traefik.http.routers.whoami-test.middlewares=secHeaders@file,compress@file,authentik@file",
|
||||
"traefik.http.routers.whoami-test.rule=Host(`whoami-test.korhonen.cc`)",
|
||||
"traefik.http.routers.whoami-test.service=whoami-test",
|
||||
"traefik.http.services.whoami-test.loadbalancer.server.port=80",
|
||||
]
|
||||
|
||||
|
||||
[networks.authentik]
|
||||
external = true
|
||||
|
|
36
docker/backup/docker-compose.toml
Normal file
36
docker/backup/docker-compose.toml
Normal file
|
@ -0,0 +1,36 @@
|
|||
[volumes.caddy_data]
|
||||
external = true
|
||||
|
||||
[volumes.caddy_config]
|
||||
external = true
|
||||
|
||||
[volumes.caddy_wkd]
|
||||
external = true
|
||||
|
||||
[volumes.homeautomation_hass]
|
||||
external = true
|
||||
|
||||
[services.backup]
|
||||
image = "offen/docker-volume-backup:v2"
|
||||
container_name = "volume-backup"
|
||||
environment = [
|
||||
"AWS_ENDPOINT",
|
||||
"AWS_S3_BUCKET_NAME",
|
||||
"AWS_ACCESS_KEY_ID",
|
||||
"AWS_SECRET_ACCESS_KEY",
|
||||
"GPG_PASSPHRASE",
|
||||
"EMAIL_SMTP_HOST",
|
||||
"EMAIL_SMTP_PASSWORD",
|
||||
"EMAIL_SMTP_USERNAME",
|
||||
"EMAIL_SMTP_PORT",
|
||||
"BACKUP_COMPRESSION=zst",
|
||||
"BACKUP_RETENTION_DAYS=7",
|
||||
]
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock:ro",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
"caddy_data:/backup/caddy_data:ro",
|
||||
"caddy_config:/backup/caddy_config:ro",
|
||||
"caddy_wkd:/backup/caddy_wkd:ro",
|
||||
"homeautomation_hass:/backup/homeautomation_hass:ro",
|
||||
]
|
208
docker/caddy/Caddyfile
Normal file
208
docker/caddy/Caddyfile
Normal file
|
@ -0,0 +1,208 @@
|
|||
korhonen.cc, *.korhonen.cc {
|
||||
tls {$CLOUDFLARE_EMAIL} {
|
||||
dns cloudflare {$CLOUDFLARE_API_TOKEN}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
|
||||
encode zstd gzip
|
||||
|
||||
@static {
|
||||
file
|
||||
path *.ico *.css *.js *.gif *.webp *.avif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.pdf *.webmanifest
|
||||
}
|
||||
|
||||
header {
|
||||
Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
|
||||
}
|
||||
|
||||
@homepage-www-redir host www.korhonen.cc
|
||||
handle @homepage-www-redir {
|
||||
redir https://korhonen.cc
|
||||
}
|
||||
|
||||
@homepage host korhonen.cc
|
||||
handle @homepage {
|
||||
# Redirect finnish WIP
|
||||
# @redirFinnish {
|
||||
# header Accept-Language *fi-FI*
|
||||
# not path *.js *.css *.png *.jpg *.jpeg *.svg
|
||||
# not path /en* /fi*
|
||||
# }
|
||||
# redir @redirFinnish /fi{uri}
|
||||
#
|
||||
# uri strip_prefix /en
|
||||
|
||||
header @static Cache-Control max-age=5184000
|
||||
root * /var/www/korhonen.cc
|
||||
file_server
|
||||
}
|
||||
|
||||
@wkd host openpgpkey.korhonen.cc
|
||||
handle @wkd {
|
||||
root * /var/www/wkd
|
||||
file_server browse
|
||||
header Access-Control-Allow-Origin "*"
|
||||
}
|
||||
|
||||
@index host index.korhonen.cc
|
||||
handle @index {
|
||||
root * /var/www/index.korhonen.cc
|
||||
file_server browse
|
||||
}
|
||||
|
||||
@home-assistant host home.korhonen.cc
|
||||
handle @home-assistant {
|
||||
reverse_proxy home-assistant:8123
|
||||
}
|
||||
|
||||
@authentik host sso.korhonen.cc
|
||||
handle @authentik {
|
||||
reverse_proxy authentik:9000
|
||||
}
|
||||
|
||||
@forgejo host git.korhonen.cc
|
||||
handle @forgejo {
|
||||
rewrite /user/login /user/oauth2/authentik
|
||||
reverse_proxy forgejo:3000
|
||||
}
|
||||
|
||||
@woodpecker host ci.korhonen.cc
|
||||
handle @woodpecker {
|
||||
reverse_proxy woodpecker:8000
|
||||
}
|
||||
|
||||
@searx host search.korhonen.cc
|
||||
handle @searx {
|
||||
reverse_proxy searx:8080
|
||||
}
|
||||
|
||||
@freshrss host rss.korhonen.cc
|
||||
handle @freshrss {
|
||||
reverse_proxy freshrss
|
||||
}
|
||||
|
||||
@jellyfin host jellyfin.korhonen.cc
|
||||
handle @jellyfin {
|
||||
reverse_proxy jellyfin:8096
|
||||
}
|
||||
|
||||
@pihole host pihole.korhonen.cc
|
||||
handle @pihole {
|
||||
reverse_proxy pihole
|
||||
}
|
||||
|
||||
@umami host umami.korhonen.cc
|
||||
handle @umami {
|
||||
reverse_proxy umami:3000
|
||||
rewrite /ua9quuaW.js /script.js
|
||||
}
|
||||
|
||||
@nextcloud host cloud.korhonen.cc
|
||||
handle @nextcloud {
|
||||
# Redirect login page to Authentik
|
||||
redir /login /apps/sociallogin/custom_oidc/korhonen-sso 301
|
||||
|
||||
# .htaccess / data / config / ... shouldn't be accessible from outside
|
||||
@forbidden {
|
||||
path /.htaccess
|
||||
path /data/*
|
||||
path /config/*
|
||||
path /db_structure
|
||||
path /.xml
|
||||
path /README
|
||||
path /3rdparty/*
|
||||
path /lib/*
|
||||
path /templates/*
|
||||
path /occ
|
||||
path /console.php
|
||||
}
|
||||
handle @forbidden {
|
||||
respond 404
|
||||
}
|
||||
|
||||
redir /.well-known/carddav /remote.php/dav 301
|
||||
redir /.well-known/caldav /remote.php/dav 301
|
||||
|
||||
root * /var/www/nextcloud
|
||||
php_fastcgi nextcloud:9000 {
|
||||
root /var/www/html
|
||||
# Tells nextcloud to remove /index.php from URLs in links
|
||||
env front_controller_active true
|
||||
}
|
||||
file_server
|
||||
}
|
||||
|
||||
@tvheadend host tvheadend.korhonen.cc
|
||||
handle @tvheadend {
|
||||
reverse_proxy tvheadend:9981
|
||||
}
|
||||
|
||||
@collabora host collabora.korhonen.cc
|
||||
handle @collabora {
|
||||
reverse_proxy collabora:9980
|
||||
}
|
||||
|
||||
@grafana host grafana.korhonen.cc
|
||||
handle @grafana {
|
||||
reverse_proxy grafana:3000
|
||||
}
|
||||
|
||||
@drop host drop.korhonen.cc
|
||||
handle @drop {
|
||||
reverse_proxy drop:3000
|
||||
}
|
||||
|
||||
@ipvX host ipv6.korhonen.cc ipv4.korhonen.cc
|
||||
handle @ipvX {
|
||||
respond {remote_host}
|
||||
}
|
||||
|
||||
handle {
|
||||
respond "404 Not Found" 404
|
||||
}
|
||||
|
||||
handle_errors {
|
||||
@homepage_404 {
|
||||
expression {http.error.status_code} == 404
|
||||
host korhonen.cc
|
||||
}
|
||||
handle @homepage_404 {
|
||||
root * /var/www/korhonen.cc
|
||||
rewrite * /404.html
|
||||
file_server
|
||||
}
|
||||
|
||||
respond "{err.status_code} {err.status_text}"
|
||||
}
|
||||
}
|
||||
|
||||
korhonen.social, *.korhonen.social {
|
||||
tls {$CLOUDFLARE_EMAIL} {
|
||||
dns cloudflare {$CLOUDFLARE_API_TOKEN}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
|
||||
encode zstd gzip
|
||||
|
||||
header {
|
||||
Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
|
||||
}
|
||||
|
||||
@firefish-www-redir host www.korhonen.social
|
||||
handle @firefish-www-redir {
|
||||
redir https://korhonen.social
|
||||
}
|
||||
|
||||
@firefish host korhonen.social
|
||||
handle @firefish {
|
||||
reverse_proxy firefish:3000
|
||||
}
|
||||
|
||||
handle {
|
||||
respond "404 Not Found" 404
|
||||
}
|
||||
|
||||
handle_errors {
|
||||
respond "{err.status_code} {err.status_text}"
|
||||
}
|
||||
}
|
29
docker/caddy/docker-compose.toml
Normal file
29
docker/caddy/docker-compose.toml
Normal file
|
@ -0,0 +1,29 @@
|
|||
[volumes]
|
||||
data = {}
|
||||
config = {}
|
||||
wkd = {}
|
||||
korhonen_cc = {}
|
||||
|
||||
[volumes.nextcloud_config]
|
||||
external = true
|
||||
|
||||
[services.caddy]
|
||||
image = "git.korhonen.cc/functionalhacker/caddy"
|
||||
container_name = "caddy"
|
||||
restart = "unless-stopped"
|
||||
ports = ["80:80", "443:443/tcp", "443:443/udp"]
|
||||
networks = ["proxy"]
|
||||
volumes = [
|
||||
"./Caddyfile:/etc/caddy/Caddyfile",
|
||||
"data:/data",
|
||||
"config:/config",
|
||||
"wkd:/var/www/wkd",
|
||||
"korhonen_cc:/var/www/korhonen.cc",
|
||||
"nextcloud_config:/var/www/nextcloud",
|
||||
"/var/www/index.korhonen.cc:/var/www/index.korhonen.cc",
|
||||
]
|
||||
environment = ["CLOUDFLARE_EMAIL", "CLOUDFLARE_API_TOKEN", "ACME_AGREE=true"]
|
||||
cap_add = ["NET_ADMIN"]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -4,5 +4,5 @@ container_name = "cloudflare-ddns"
|
|||
security_opt = ["no-new-privileges:true"]
|
||||
network_mode = "host"
|
||||
environment = ["PUID=1000", "PGID=1000"]
|
||||
volumes = ["/docker/ddns/config.json:/config.json"]
|
||||
volumes = ["/mnt/Storage/docker/ddns/config.json:/config.json"]
|
||||
restart = "unless-stopped"
|
||||
|
|
9
docker/drop/docker-compose.toml
Normal file
9
docker/drop/docker-compose.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
[services.drop]
|
||||
image = "lscr.io/linuxserver/pairdrop"
|
||||
container_name = "drop"
|
||||
restart = "unless-stopped"
|
||||
networks = ["proxy"]
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
41
docker/firefish/docker-compose.toml
Normal file
41
docker/firefish/docker-compose.toml
Normal file
|
@ -0,0 +1,41 @@
|
|||
[volumes]
|
||||
files = {}
|
||||
config = {}
|
||||
redis = {}
|
||||
db = {}
|
||||
|
||||
[services.firefish]
|
||||
image = "registry.firefish.dev/firefish/firefish"
|
||||
container_name = "firefish"
|
||||
restart = "unless-stopped"
|
||||
depends_on = ["redis"]
|
||||
ports = ["3084:3000"]
|
||||
networks = ["firefish", "proxy"]
|
||||
environment = { NODE_ENV = "production" }
|
||||
volumes = ["files:/firefish/files", "config:/firefish/.config:ro"]
|
||||
|
||||
[services.redis]
|
||||
image = "redis"
|
||||
container_name = "redis-firefish"
|
||||
restart = "unless-stopped"
|
||||
networks = ["firefish"]
|
||||
volumes = ["redis:/data"]
|
||||
|
||||
[services.db]
|
||||
image = "groonga/pgroonga:3.1.8-alpine-16-slim"
|
||||
container_name = "firefish-db"
|
||||
restart = "unless-stopped"
|
||||
networks = ["firefish"]
|
||||
volumes = ["db:/var/lib/postgresql/data"]
|
||||
|
||||
[services.db.healthcheck]
|
||||
test = "pg_isready --user=\"firefish\" --dbname=\"firefish\""
|
||||
interval = "5s"
|
||||
timeout = "5s"
|
||||
retries = 5
|
||||
|
||||
[networks.firefish]
|
||||
internal = true
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -1,23 +1,29 @@
|
|||
[volumes]
|
||||
data = {}
|
||||
runner = {}
|
||||
|
||||
[services.forgejo]
|
||||
image = "git.korhonen.cc/functionalhacker/forgejo-asciidoc"
|
||||
container_name = "forgejo"
|
||||
environment = ["TZ=Europe/Helsinki", "USER_UID=1000", "USER_GID=1000"]
|
||||
restart = "unless-stopped"
|
||||
networks = ["postgres", "proxy"]
|
||||
ports = ["3000:3000", "22:22"]
|
||||
volumes = ["/docker/forgejo:/data", "/etc/localtime:/etc/localtime:ro"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.forgejo-redirect.entrypoints=http",
|
||||
"traefik.http.routers.forgejo-redirect.rule=Host(`git.korhonen.cc`)",
|
||||
"traefik.http.routers.forgejo-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.forgejo.entrypoints=https",
|
||||
"traefik.http.routers.forgejo.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.forgejo.rule=Host(`git.korhonen.cc`)",
|
||||
"traefik.http.routers.forgejo.service=forgejo",
|
||||
"traefik.http.services.forgejo.loadbalancer.server.port=3000",
|
||||
ports = ["2882:22"]
|
||||
volumes = ["data:/data", "/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[services.runner]
|
||||
image = "code.forgejo.org/forgejo/runner:3.4.1"
|
||||
container_name = "forgejo-runner"
|
||||
user = "root:root"
|
||||
volumes = [
|
||||
"runner:/data",
|
||||
"./runner.yaml:/data/config.yaml",
|
||||
"/var/run/docker.sock:/var/run/docker.sock",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
environment = ["SOCKFILE=/var/run/docker.sock"]
|
||||
restart = "unless-stopped"
|
||||
command = "forgejo-runner daemon -c /data/config.yaml"
|
||||
|
||||
[networks.postgres]
|
||||
external = true
|
||||
|
|
34
docker/forgejo/runner.yaml
Normal file
34
docker/forgejo/runner.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
log:
|
||||
level: info
|
||||
|
||||
runner:
|
||||
file: .runner
|
||||
capacity: 2
|
||||
env_file: .env
|
||||
timeout: 3h
|
||||
insecure: false
|
||||
fetch_timeout: 5s
|
||||
fetch_interval: 2s
|
||||
labels:
|
||||
- 'docker:docker://git.korhonen.cc/functionalhacker/ubuntu-act:22.04'
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
dir: ''
|
||||
host: ''
|
||||
port: 0
|
||||
external_server: ''
|
||||
|
||||
container:
|
||||
network: ''
|
||||
enable_ipv6: false
|
||||
privileged: false
|
||||
options:
|
||||
workdir_parent:
|
||||
valid_volumes:
|
||||
- 'caddy_korhonen_cc'
|
||||
docker_host: ''
|
||||
force_pull: false
|
||||
|
||||
host:
|
||||
workdir_parent:
|
|
@ -1,4 +1,5 @@
|
|||
[services]
|
||||
[volumes]
|
||||
config = {}
|
||||
|
||||
[services.freshrss]
|
||||
image = "linuxserver/freshrss"
|
||||
|
@ -6,24 +7,7 @@ container_name = "freshrss"
|
|||
restart = "unless-stopped"
|
||||
networks = ["freshrss", "postgres", "proxy"]
|
||||
environment = ["PUID=1000", "PGID=985", "TZ=Europe/Helsinki"]
|
||||
volumes = [
|
||||
"/docker/freshrss/freshrss:/config",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.freshrss-redirect.entrypoints=http",
|
||||
"traefik.http.routers.freshrss-redirect.rule=Host(`rss.korhonen.cc`)",
|
||||
"traefik.http.routers.freshrss-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.freshrss.entrypoints=https",
|
||||
"traefik.http.routers.freshrss.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.freshrss.rule=Host(`rss.korhonen.cc`)",
|
||||
"traefik.http.routers.freshrss.service=freshrss",
|
||||
"traefik.http.services.freshrss.loadbalancer.server.port=80",
|
||||
]
|
||||
|
||||
[networks]
|
||||
volumes = ["config:/config", "/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[networks.freshrss]
|
||||
external = false
|
||||
|
|
|
@ -1,43 +1,20 @@
|
|||
[volumes]
|
||||
config = {}
|
||||
data = {}
|
||||
|
||||
[services.headscale]
|
||||
image = "headscale/headscale"
|
||||
image = "headscale/headscale:0"
|
||||
container_name = "headscale"
|
||||
volumes = [
|
||||
"/docker/headscale/config:/etc/headscale/",
|
||||
"/docker/headscale/data:/var/lib/headscale",
|
||||
]
|
||||
volumes = ["config:/etc/headscale", "data:/var/lib/headscale"]
|
||||
ports = ["3478:3478/udp"]
|
||||
command = "headscale serve"
|
||||
restart = "unless-stopped"
|
||||
networks = ["postgres"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.headscale-redirect.entrypoints=http",
|
||||
"traefik.http.routers.headscale-redirect.rule=PathPrefix(`/`)&&Host(`headscale.korhonen.cc`)",
|
||||
"traefik.http.routers.headscale-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.headscale.entrypoints=https",
|
||||
"traefik.http.routers.headscale.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.headscale.rule=PathPrefix(`/`) && Host(`headscale.korhonen.cc`)",
|
||||
"traefik.http.routers.headscale.service=headscale",
|
||||
"traefik.http.services.headscale.loadbalancer.server.port=8080",
|
||||
]
|
||||
|
||||
[services.headscale-ui]
|
||||
image = "ghcr.io/gurucomputing/headscale-ui"
|
||||
container_name = "headscale-ui"
|
||||
restart = "unless-stopped"
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.headscale-ui-redirect.entrypoints=http",
|
||||
"traefik.http.routers.headscale-ui-redirect.rule=PathPrefix(`/web`)&&Host(`headscale.korhonen.cc`)",
|
||||
"traefik.http.routers.headscale-ui-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.headscale-ui.entrypoints=https",
|
||||
"traefik.http.routers.headscale-ui.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.headscale-ui.rule=PathPrefix(`/web`)&&Host(`headscale.korhonen.cc`)",
|
||||
"traefik.http.routers.headscale-ui.service=headscale-ui",
|
||||
"traefik.http.services.headscale-ui.loadbalancer.server.port=80",
|
||||
]
|
||||
|
||||
[networks.postgres]
|
||||
external = true
|
||||
|
|
|
@ -1,62 +1,105 @@
|
|||
[volumes]
|
||||
hass = {}
|
||||
mosquitto = {}
|
||||
piper_english = {}
|
||||
whisper_english = {}
|
||||
openwakeword_english = {}
|
||||
|
||||
[services.home-assistant]
|
||||
container_name = "home-assistant"
|
||||
image = "homeassistant/home-assistant"
|
||||
restart = "unless-stopped"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
devices = ["/dev/ttyACM0"]
|
||||
volumes = [
|
||||
"/docker/homeautomation/home-assistant:/config",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
restart = "unless-stopped"
|
||||
volumes = ["hass:/config", "/etc/localtime:/etc/localtime:ro"]
|
||||
networks = ["homeautomation", "postgres", "proxy"]
|
||||
ports = ["8123:8123", "8300:8300"]
|
||||
extra_hosts = ["host.docker.internal:host-gateway"]
|
||||
depends_on = ["mosquitto"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.home-assistant-redirect.entrypoints=http",
|
||||
"traefik.http.routers.home-assistant-redirect.rule=Host(`home.korhonen.cc`)",
|
||||
"traefik.http.routers.home-assistant-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.home-assistant.entrypoints=https",
|
||||
"traefik.http.routers.home-assistant.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.home-assistant.rule=Host(`home.korhonen.cc`)",
|
||||
"traefik.http.routers.home-assistant.service=home-assistant",
|
||||
"traefik.http.services.home-assistant.loadbalancer.server.port=8123",
|
||||
]
|
||||
|
||||
[services.esphome]
|
||||
container_name = "esphome"
|
||||
image = "esphome/esphome"
|
||||
volumes = ["/docker/homeautomation/esphome:/config"]
|
||||
restart = "unless-stopped"
|
||||
network_mode = "host"
|
||||
|
||||
[services.mosquitto]
|
||||
container_name = "mosquitto"
|
||||
image = "eclipse-mosquitto"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
ports = ["1883:1883"]
|
||||
networks = ["homeautomation"]
|
||||
volumes = [
|
||||
"/docker/homeautomation/mosquitto:/mosquitto",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
restart = "unless-stopped"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
networks = ["homeautomation"]
|
||||
ports = ["1883:1883", "8866:8866"]
|
||||
volumes = ["mosquitto:/mosquitto", "/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[services.rhasspy]
|
||||
container_name = "rhasspy"
|
||||
image = "rhasspy/rhasspy"
|
||||
command = "--profile en --user-profiles /profiles"
|
||||
volumes = ["/docker/homeautomation/rhasspy:/profiles"]
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
ports = ["12101:12101"]
|
||||
networks = ["homeautomation"]
|
||||
[services.piper_english]
|
||||
container_name = "piper_english"
|
||||
image = "rhasspy/wyoming-piper"
|
||||
restart = "unless-stopped"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
ports = ["10200:10200"]
|
||||
networks = ["homeautomation"]
|
||||
command = ["--voice", "en_US-hfc_male-medium"]
|
||||
volumes = ["piper_english:/data", "/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[services.whisper_english]
|
||||
container_name = "whisper_english"
|
||||
image = "rhasspy/wyoming-whisper"
|
||||
restart = "unless-stopped"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
ports = ["10300:10300"]
|
||||
networks = ["homeautomation"]
|
||||
depends_on = ["home-assistant"]
|
||||
devices = ["/dev/snd:/dev/snd"]
|
||||
command = ["--model", "tiny-int8", "--language", "en"]
|
||||
volumes = ["whisper_english:/data", "/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[networks]
|
||||
[services.openwakeword_english]
|
||||
container_name = "openwakeword_english"
|
||||
image = "rhasspy/wyoming-openwakeword"
|
||||
restart = "unless-stopped"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
networks = ["homeautomation"]
|
||||
command = ["--preload-model", "ok_nabu"]
|
||||
depends_on = ["home-assistant"]
|
||||
volumes = ["openwakeword_english:/data", "/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[services.microphone]
|
||||
build = "https://github.com/rhasspy/wyoming-mic-external.git"
|
||||
image = "rhasspy/wyoming-mic-external"
|
||||
container_name = "microphone"
|
||||
restart = "unless-stopped"
|
||||
devices = ["/dev/snd:/dev/snd"]
|
||||
ports = ["10600:10600"]
|
||||
group_add = ["audio"]
|
||||
networks = ["homeautomation"]
|
||||
command = ["--device", "plughw:CARD=USB,DEV=0", "--debug"]
|
||||
volumes = ["/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[services.speaker]
|
||||
build = "https://github.com/rhasspy/wyoming-snd-external.git"
|
||||
image = "rhasspy/wyoming-snd-external"
|
||||
container_name = "speaker"
|
||||
restart = "unless-stopped"
|
||||
devices = ["/dev/snd:/dev/snd"]
|
||||
ports = ["10601:10601"]
|
||||
group_add = ["audio"]
|
||||
networks = ["homeautomation"]
|
||||
command = ["--device", "iec958:CARD=USB,DEV=0", "--debug"]
|
||||
volumes = ["/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[services.satellite]
|
||||
build = "https://github.com/rhasspy/wyoming-satellite.git"
|
||||
image = "rhasspy/wyoming-satellite"
|
||||
container_name = "satellite"
|
||||
restart = "unless-stopped"
|
||||
ports = ["10700:10700"]
|
||||
networks = ["homeautomation"]
|
||||
depends_on = ["speaker", "microphone", "whisper_english"]
|
||||
command = [
|
||||
"--name",
|
||||
"ha-server-satellite",
|
||||
"--mic-uri",
|
||||
"tcp://microphone:10600",
|
||||
"--snd-uri",
|
||||
"tcp://speaker:10601",
|
||||
"--wake-uri",
|
||||
"tcp://openwakeword_english:10400",
|
||||
"--debug",
|
||||
]
|
||||
volumes = ["/etc/localtime:/etc/localtime:ro"]
|
||||
|
||||
[networks.homeautomation]
|
||||
external = false
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
[services]
|
||||
|
||||
[services.nginx]
|
||||
image = "fraoustin/fancyindex"
|
||||
container_name = "index.korhonen.cc"
|
||||
environment = ["DISABLE_AUTH=true", "CONTAINER_TIMEZONE=\"Europe/Helsinki\""]
|
||||
volumes = ["/docker/index.korhonen.cc:/share"]
|
||||
networks = ["proxy"]
|
||||
restart = "unless-stopped"
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.index-redirect.entrypoints=http",
|
||||
"traefik.http.routers.index-redirect.rule=Host(`index.korhonen.cc`)",
|
||||
"traefik.http.routers.index-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.index.entrypoints=https",
|
||||
"traefik.http.routers.index.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.index.rule=Host(`index.korhonen.cc`)",
|
||||
"traefik.http.routers.index.service=index",
|
||||
"traefik.http.services.index.loadbalancer.server.port=80",
|
||||
]
|
||||
|
||||
[networks]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -1,4 +1,12 @@
|
|||
[services]
|
||||
[volumes]
|
||||
config = {}
|
||||
cache = {}
|
||||
|
||||
[volumes.media]
|
||||
external = true
|
||||
|
||||
[volumes.nextcloud_data]
|
||||
external = true
|
||||
|
||||
[services.jellyfin]
|
||||
image = "jellyfin/jellyfin"
|
||||
|
@ -8,30 +16,16 @@ ports = ["8096:8096"]
|
|||
networks = ["proxy", "authentik"]
|
||||
restart = "unless-stopped"
|
||||
volumes = [
|
||||
"/docker/jellyfin/config:/config",
|
||||
"/docker/jellyfin/cache:/cache",
|
||||
"/mnt/Storage/Media:/media",
|
||||
"/mnt/Storage/Nextcloud/FunctionalHacker/files/Media/Music:/media/Music",
|
||||
"config:/config",
|
||||
"cache:/cache",
|
||||
"media:/media",
|
||||
"nextcloud_data:/nextcloud_data",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
devices = [
|
||||
"/dev/dri/renderD128:/dev/dri/renderD128",
|
||||
"/dev/dri/card0:/dev/dri/card0",
|
||||
]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.jellyfin-redirect.entrypoints=http",
|
||||
"traefik.http.routers.jellyfin-redirect.rule=Host(`jellyfin.korhonen.cc`)",
|
||||
"traefik.http.routers.jellyfin-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.jellyfin.entrypoints=https",
|
||||
"traefik.http.routers.jellyfin.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.jellyfin.rule=Host(`jellyfin.korhonen.cc`)",
|
||||
"traefik.http.routers.jellyfin.service=jellyfin",
|
||||
"traefik.http.services.jellyfin.loadbalancer.server.port=8096",
|
||||
]
|
||||
|
||||
[networks]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
[services]
|
||||
|
||||
[services.nginx]
|
||||
image = "nginx"
|
||||
container_name = "korhonen.cc"
|
||||
volumes = [
|
||||
"/var/www/korhonen.cc:/korhonen.cc:ro",
|
||||
"./nginx.conf:/etc/nginx/conf.d/default.conf",
|
||||
]
|
||||
networks = ["proxy"]
|
||||
restart = "unless-stopped"
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.korhonen-redirect.entrypoints=http",
|
||||
"traefik.http.routers.korhonen-redirect.rule=Host(`korhonen.cc`) || Host(`www.korhonen.cc`)",
|
||||
"traefik.http.routers.korhonen-redirect.middlewares=www2non-www@file,http2https@file",
|
||||
"traefik.http.routers.korhonen.entrypoints=https",
|
||||
"traefik.http.routers.korhonen.middlewares=secHeaders@file,www2non-www@file,compress@file",
|
||||
"traefik.http.routers.korhonen.rule=Host(`korhonen.cc`) || Host(`www.korhonen.cc`)",
|
||||
"traefik.http.routers.korhonen.service=korhonen",
|
||||
"traefik.http.services.korhonen.loadbalancer.server.port=80",
|
||||
]
|
||||
|
||||
[networks]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -1,30 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /korhonen.cc;
|
||||
index index.html;
|
||||
|
||||
location ~* \.(?:css|js|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location /fi {
|
||||
error_page 404 /fi/404.html;
|
||||
}
|
||||
}
|
||||
|
||||
# Use hugo 404 page
|
||||
error_page 404 /404.html;
|
||||
|
||||
# Redirect 5xx to standard error pages
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
[services.misskey]
|
||||
image = "misskey/misskey"
|
||||
container_name = "misskey"
|
||||
restart = "unless-stopped"
|
||||
depends_on = ["redis"]
|
||||
ports = ["3082:3000"]
|
||||
networks = ["misskey", "proxy", "postgres"]
|
||||
volumes = [
|
||||
"/docker/misskey/files:/misskey/files",
|
||||
"/docker/misskey/config:/misskey/.config:ro",
|
||||
]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.misskey-redirect.entrypoints=http",
|
||||
"traefik.http.routers.misskey-redirect.rule=Host(`social.korhonen.cc`)",
|
||||
"traefik.http.routers.misskey-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.misskey.entrypoints=https",
|
||||
"traefik.http.routers.misskey.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.misskey.rule=Host(`social.korhonen.cc`)",
|
||||
"traefik.http.routers.misskey.service=misskey",
|
||||
"traefik.http.services.misskey.loadbalancer.server.port=3000",
|
||||
]
|
||||
|
||||
[services.elasticsearch]
|
||||
image = "docker.elastic.co/elasticsearch/elasticsearch:7.17.8"
|
||||
container_name = "misskey-elasticsearch"
|
||||
restart = "unless-stopped"
|
||||
volumes = ["/docker/misskey/elasticsearch/:/usr/share/elasticsearch/data"]
|
||||
networks = ["misskey"]
|
||||
environment = [
|
||||
"cluster.name=misskey-es-cluster",
|
||||
"node.name=misskey-node",
|
||||
"discovery.type=single-node",
|
||||
"bootstrap.memory_lock=true",
|
||||
"ES_JAVA_OPTS=-Xms200m -Xmx200m",
|
||||
]
|
||||
[services.elasticsearch.ulimits.memlock]
|
||||
soft = -1
|
||||
hard = -1
|
||||
|
||||
[services.redis]
|
||||
image = "redis"
|
||||
container_name = "redis-misskey"
|
||||
restart = "unless-stopped"
|
||||
networks = ["misskey"]
|
||||
volumes = ["/docker/misskey/redis:/data"]
|
||||
|
||||
[networks.misskey]
|
||||
internal = true
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
||||
|
||||
[networks.postgres]
|
||||
external = true
|
|
@ -1,10 +1,10 @@
|
|||
[services]
|
||||
[volumes]
|
||||
config = {}
|
||||
|
||||
[services.mumble]
|
||||
container_name = "mumble"
|
||||
image = "phlak/mumble"
|
||||
user = "1000:985"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
network_mode = "host"
|
||||
volumes = ["/docker/mumble:/etc/mumble", "/etc/localtime:/etc/localtime:ro"]
|
||||
volumes = ["config:/etc/mumble", "/etc/localtime:/etc/localtime:ro"]
|
||||
restart = "unless-stopped"
|
||||
|
|
|
@ -1,62 +1,41 @@
|
|||
[services]
|
||||
[volumes.nextcloud_config]
|
||||
external = true
|
||||
|
||||
[services.nextcloud-web]
|
||||
image = "nginx:alpine"
|
||||
container_name = "nextcloud-web"
|
||||
restart = "unless-stopped"
|
||||
networks = ["nextcloud", "proxy"]
|
||||
volumes = [
|
||||
"./nginx.conf:/etc/nginx/nginx.conf",
|
||||
"/docker/nextcloud:/var/www/html:z",
|
||||
]
|
||||
depends_on = ["nextcloud"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.nextcloud-redirect.entrypoints=http",
|
||||
"traefik.http.routers.nextcloud-redirect.rule=Host(`cloud.korhonen.cc`)",
|
||||
"traefik.http.routers.nextcloud-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.nextcloud.entrypoints=https",
|
||||
"traefik.http.routers.nextcloud.rule=Host(`cloud.korhonen.cc`)",
|
||||
"traefik.http.routers.nextcloud.service=nextcloud",
|
||||
"traefik.http.routers.nextcloud.middlewares=secHeaders@file,nextcloud-security-headers@file,nextcloud-redirect-dav@file,nextcloud-redirect-extra@file,compress@file",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.services.nextcloud.loadbalancer.server.port=80",
|
||||
]
|
||||
[volumes.nextcloud_data]
|
||||
external = true
|
||||
|
||||
[services.nextcloud]
|
||||
image = "nextcloud:fpm-alpine"
|
||||
container_name = "nextcloud"
|
||||
restart = "unless-stopped"
|
||||
user = "82:82"
|
||||
networks = ["nextcloud", "postgres", "proxy"]
|
||||
volumes = [
|
||||
"/docker/nextcloud:/var/www/html:z",
|
||||
"/mnt/Storage/Nextcloud:/var/www/html/data",
|
||||
"nextcloud_config:/var/www/html",
|
||||
"nextcloud_data:/var/www/html/data",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
environment = [
|
||||
"TZ=Europe/Helsinki",
|
||||
"REDIS_HOST=redis",
|
||||
"REDIS_HOST_PASSWORD=123",
|
||||
"TRUSTED_PROXIES=traefik",
|
||||
"TRUSTED_PROXIES=caddy",
|
||||
"NEXTCLOUD_TRUSTED_DOMAINS=cloud.korhonen.cc",
|
||||
"OVERWRITEHOST=cloud.korhonen.cc",
|
||||
"OVERWRITEPROTOCOL=https",
|
||||
]
|
||||
depends_on = ["redis"]
|
||||
labels = [
|
||||
"ofelia.enabled=true",
|
||||
"ofelia.job-exec.nextcloud.schedule=0 */5 * * * *",
|
||||
"ofelia.job-exec.nextcloud.command=php /var/www/html/cron.php",
|
||||
"ofelia.job-exec.nextcloud.user=www-data",
|
||||
"ofelia.smtp-host=${SMTP_HOST}",
|
||||
"ofelia.smtp-port=${SMTP_PORT}",
|
||||
"ofelia.smtp-user=${SMTP_USER}",
|
||||
"ofelia.smtp-password=${SMTP_PASSWORD}",
|
||||
"ofelia.email-to=${EMAIL_TO}",
|
||||
"ofelia.email-from=${EMAIL_FROM}",
|
||||
"ofelia.mail-only-on-error",
|
||||
]
|
||||
|
||||
[services.nextcloud.labels]
|
||||
"ofelia.enabled" = true
|
||||
"ofelia.job-exec.nextcloud.schedule" = "0 */5 * * * *"
|
||||
"ofelia.job-exec.nextcloud.command" = "php /var/www/html/cron.php"
|
||||
"ofelia.job-exec.nextcloud.user" = "www-data"
|
||||
"ofelia.smtp-host" = "${SMTP_HOST}"
|
||||
"ofelia.smtp-port" = "${SMTP_PORT}"
|
||||
"ofelia.smtp-user" = "${SMTP_USER}"
|
||||
"ofelia.smtp-password" = "${SMTP_PASSWORD}"
|
||||
"ofelia.email-to" = "${EMAIL_TO}"
|
||||
"ofelia.email-from" = "${EMAIL_FROM}"
|
||||
"ofelia.mail-only-on-error" = true
|
||||
|
||||
[services.redis]
|
||||
image = "redis:alpine"
|
||||
|
@ -70,7 +49,7 @@ image = "instrumentisto/coturn"
|
|||
container_name = "coturn"
|
||||
restart = "unless-stopped"
|
||||
env_file = ".env"
|
||||
ports = ["3478:3478/tcp", "3478:3478/udp"]
|
||||
ports = ["3478:3478/tcp", "3478:3478/udp", "49160-49200:49160-49200/udp"]
|
||||
networks = ["nextcloud"]
|
||||
command = [
|
||||
"-n",
|
||||
|
@ -94,18 +73,6 @@ environment = [
|
|||
'extra_params=--o:ssl.enable=false --o:ssl.termination=true',
|
||||
]
|
||||
networks = ["proxy"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.collabora-redirect.entrypoints=http",
|
||||
"traefik.http.routers.collabora-redirect.rule=Host(`collabora.korhonen.cc`)",
|
||||
"traefik.http.routers.collabora-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.collabora.entrypoints=https",
|
||||
"traefik.http.routers.collabora.rule=Host(`collabora.korhonen.cc`)",
|
||||
"traefik.http.routers.collabora.service=collabora",
|
||||
"traefik.http.routers.collabora.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.services.collabora.loadbalancer.server.port=9980",
|
||||
]
|
||||
|
||||
[networks.nextcloud]
|
||||
external = false
|
||||
|
|
|
@ -1,173 +0,0 @@
|
|||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
# Prevent nginx HTTP Server Detection
|
||||
server_tokens off;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
upstream php-handler {
|
||||
server nextcloud:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
# HSTS settings
|
||||
# WARNING: Only add the preload option once you read about
|
||||
# the consequences in https://hstspreload.org/. This option
|
||||
# will add the domain to a hardcoded list that is shipped
|
||||
# in all major browsers and getting removed from this list
|
||||
# could take several months.
|
||||
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
||||
|
||||
# set max upload size
|
||||
client_max_body_size 512M;
|
||||
fastcgi_buffers 64 4K;
|
||||
|
||||
# Enable gzip but do not remove ETag headers
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
|
||||
# Pagespeed is not supported by Nextcloud, so if your server is built
|
||||
# with the `ngx_pagespeed` module, uncomment this line to disable it.
|
||||
#pagespeed off;
|
||||
|
||||
# HTTP response headers borrowed from Nextcloud `.htaccess`
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Download-Options "noopen" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||
add_header X-Robots-Tag "none" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
# Remove X-Powered-By, which is an information leak
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
|
||||
# Path to the root of your installation
|
||||
root /var/www/html;
|
||||
|
||||
# Specify how to handle directories -- specifying `/index.php$request_uri`
|
||||
# here as the fallback means that Nginx always exhibits the desired behaviour
|
||||
# when a client requests a path that corresponds to a directory that exists
|
||||
# on the server. In particular, if that directory contains an index.php file,
|
||||
# that file is correctly served; if it doesn't, then the request is passed to
|
||||
# the front-end controller. This consistent behaviour means that we don't need
|
||||
# to specify custom rules for certain paths (e.g. images and other assets,
|
||||
# `/updater`, `/ocm-provider`, `/ocs-provider`), and thus
|
||||
# `try_files $uri $uri/ /index.php$request_uri`
|
||||
# always provides the desired behaviour.
|
||||
index index.php index.html /index.php$request_uri;
|
||||
|
||||
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
|
||||
location = / {
|
||||
if ( $http_user_agent ~ ^DavClnt ) {
|
||||
return 302 /remote.php/webdav/$is_args$args;
|
||||
}
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Make a regex exception for `/.well-known` so that clients can still
|
||||
# access it despite the existence of the regex rule
|
||||
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
|
||||
# for `/.well-known`.
|
||||
location ^~ /.well-known {
|
||||
# The rules in this block are an adaptation of the rules
|
||||
# in `.htaccess` that concern `/.well-known`.
|
||||
|
||||
location = /.well-known/carddav { return 301 /remote.php/dav/; }
|
||||
location = /.well-known/caldav { return 301 /remote.php/dav/; }
|
||||
|
||||
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
|
||||
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
|
||||
|
||||
# Let Nextcloud's API for `/.well-known` URIs handle all other
|
||||
# requests by passing them to the front-end controller.
|
||||
return 301 /index.php$request_uri;
|
||||
}
|
||||
|
||||
# Rules borrowed from `.htaccess` to hide certain paths from clients
|
||||
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
|
||||
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
|
||||
|
||||
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
|
||||
# which handle static assets (as seen below). If this block is not declared first,
|
||||
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
||||
# to the URI, resulting in a HTTP 500 error response.
|
||||
location ~ \.php(?:$|/) {
|
||||
# Required for legacy support
|
||||
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
||||
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
set $path_info $fastcgi_path_info;
|
||||
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
#fastcgi_param HTTPS on;
|
||||
|
||||
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
||||
fastcgi_param front_controller_active true; # Enable pretty urls
|
||||
fastcgi_pass php-handler;
|
||||
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_request_buffering off;
|
||||
}
|
||||
|
||||
location ~ \.(?:css|js|svg|gif)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
||||
access_log off; # Optional: Don't log access to assets
|
||||
}
|
||||
|
||||
location ~ \.woff2?$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
expires 7d; # Cache-Control policy borrowed from `.htaccess`
|
||||
access_log off; # Optional: Don't log access to assets
|
||||
}
|
||||
|
||||
# Rule borrowed from `.htaccess`
|
||||
location /remote {
|
||||
return 301 /remote.php$request_uri;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$request_uri;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
[services]
|
||||
[volumes]
|
||||
config = {}
|
||||
dnsmasq = {}
|
||||
|
||||
[services.pihole]
|
||||
container_name = "pihole"
|
||||
|
@ -6,30 +8,16 @@ image = "pihole/pihole"
|
|||
ports = ["53:53/tcp", "53:53/udp", "67:67/udp", "8069:80/tcp"]
|
||||
networks = ["proxy"]
|
||||
volumes = [
|
||||
"/docker/pihole/pihole:/etc/pihole/",
|
||||
"/docker/pihole/dnsmasq:/etc/dnsmasq.d/",
|
||||
"config:/etc/pihole/",
|
||||
"dnsmasq:/etc/dnsmasq.d/",
|
||||
]
|
||||
dns = ["127.0.0.1", "1.1.1.1"]
|
||||
cap_add = ["NET_ADMIN"]
|
||||
restart = "unless-stopped"
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.pihole-redirect.entrypoints=http",
|
||||
"traefik.http.routers.pihole-redirect.rule=Host(`pihole.korhonen.cc`)",
|
||||
"traefik.http.routers.pihole-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.pihole.entrypoints=https",
|
||||
"traefik.http.routers.pihole.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.pihole.rule=Host(`pihole.korhonen.cc`)",
|
||||
"traefik.http.routers.pihole.service=pihole",
|
||||
"traefik.http.services.pihole.loadbalancer.server.port=80",
|
||||
]
|
||||
|
||||
[services.pihole.environment]
|
||||
TZ = "Europe/Helsinki"
|
||||
WEBPASSWORD = "${WEBPASSWORD}"
|
||||
|
||||
[networks]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
[services]
|
||||
[volumes]
|
||||
data = {}
|
||||
|
||||
[services.postgres]
|
||||
container_name = "postgres"
|
||||
image = "postgres:15"
|
||||
environment = ["TZ=Europe/Helsinki", "POSTGRES_PASSWORD=12345"]
|
||||
ports = ["5432:5432"]
|
||||
image = "postgres:16"
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
ports = ["127.0.0.1:5432:5432"]
|
||||
networks = ["postgres"]
|
||||
volumes = [
|
||||
"/docker/postgres:/var/lib/postgresql/data",
|
||||
"data:/var/lib/postgresql/data",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
restart = "unless-stopped"
|
||||
|
||||
[networks]
|
||||
|
||||
[networks.postgres]
|
||||
external = true
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
[services]
|
||||
|
||||
[services.remotely]
|
||||
image = "translucency/remotely"
|
||||
container_name = "remotely"
|
||||
networks = ["proxy"]
|
||||
volumes = ["/docker/remotely:/remotely-data"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.remotely-redirect.entrypoints=http",
|
||||
"traefik.http.routers.remotely-redirect.rule=Host(`remotely.korhonen.cc`)",
|
||||
"traefik.http.routers.remotely-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.remotely.entrypoints=https",
|
||||
"traefik.http.routers.remotely.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.remotely.rule=Host(`remotely.korhonen.cc`)",
|
||||
"traefik.http.routers.remotely.service=remotely",
|
||||
"traefik.http.services.remotely.loadbalancer.server.port=5000",
|
||||
]
|
||||
|
||||
[networks]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -1,27 +1,18 @@
|
|||
[volumes]
|
||||
config = {}
|
||||
|
||||
[services.searx]
|
||||
container_name = "searx"
|
||||
image = "searxng/searxng"
|
||||
restart = "unless-stopped"
|
||||
networks = ["searx", "proxy"]
|
||||
volumes = [
|
||||
"/docker/searx:/etc/searxng",
|
||||
"config:/etc/searxng",
|
||||
#"/docker/searx/logo.png:/usr/local/searxng/searx/static/themes/simple/img/searxng.png:ro"
|
||||
]
|
||||
environment = ["SEARXNG_BASE_URL=https://search.korhonen.cc/"]
|
||||
cap_drop = ["ALL"]
|
||||
cap_add = ["CHOWN", "SETGID", "SETUID", "DAC_OVERRIDE"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.searx-redirect.entrypoints=http",
|
||||
"traefik.http.routers.searx-redirect.rule=Host(`search.korhonen.cc`)",
|
||||
"traefik.http.routers.searx-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.searx.entrypoints=https",
|
||||
"traefik.http.routers.searx.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.searx.rule=Host(`search.korhonen.cc`)",
|
||||
"traefik.http.routers.searx.service=searx",
|
||||
"traefik.http.services.searx.loadbalancer.server.port=8080",
|
||||
]
|
||||
|
||||
[services.searx.logging]
|
||||
driver = "json-file"
|
||||
|
|
27
docker/stats/docker-compose.toml
Normal file
27
docker/stats/docker-compose.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
[services.grafana]
|
||||
image = "grafana/grafana"
|
||||
container_name = "grafana"
|
||||
volumes = ["grafana:/var/lib/grafana"]
|
||||
networks = ["stats", "proxy"]
|
||||
user = "1000:984"
|
||||
env_file = [".env"]
|
||||
environment = [
|
||||
"GF_AUTH_GENERIC_OAUTH_CLIENT_ID",
|
||||
"GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET",
|
||||
"GF_AUTH_GENERIC_OAUTH_ENABLED=true",
|
||||
"GF_AUTH_GENERIC_OAUTH_NAME=authentik",
|
||||
"GF_AUTH_GENERIC_OAUTH_SCOPES=openid profile email",
|
||||
"GF_AUTH_GENERIC_OAUTH_AUTH_URL=https://sso.korhonen.cc/application/o/authorize/",
|
||||
"GF_AUTH_GENERIC_OAUTH_TOKEN_URL=https://sso.korhonen.cc/application/o/token/",
|
||||
"GF_AUTH_GENERIC_OAUTH_API_URL=https://sso.korhonen.cc/application/o/userinfo/",
|
||||
"GF_AUTH_SIGNOUT_REDIRECT_URL=https://sso.korhonen.cc/application/o/grafana/end-session/",
|
||||
"GF_AUTH_OAUTH_AUTO_LOGIN=true",
|
||||
"GF_SERVER_ROOT_URL=https://grafana.korhonen.cc",
|
||||
"GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH=contains(groups[*], 'Administrators') && 'Admin' || 'Viewer'",
|
||||
]
|
||||
|
||||
[networks.stats]
|
||||
external = false
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -1,53 +0,0 @@
|
|||
[services.traefik]
|
||||
image = "traefik"
|
||||
container_name = "traefik"
|
||||
restart = "unless-stopped"
|
||||
ports = ["80:80", "443:443/tcp", "443:443/udp"]
|
||||
environment = [
|
||||
"TZ=Europe/Helsinki",
|
||||
"ADMIN_EMAIL",
|
||||
"CF_API_EMAIL=${ADMIN_EMAIL}",
|
||||
"CF_API_KEY",
|
||||
"CF_ZONE_API_TOKEN",
|
||||
"CF_DNS_API_TOKEN",
|
||||
]
|
||||
security_opt = ["no-new-privileges:true"]
|
||||
networks = ["proxy"]
|
||||
volumes = [
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
"/var/run/docker.sock:/var/run/docker.sock:ro",
|
||||
"./traefik.toml:/traefik.toml:ro",
|
||||
"./dynamic.toml:/dynamic.toml:ro",
|
||||
"/docker/traefik/traefik/acme.json:/acme.json",
|
||||
"/docker/traefik/traefik/log:/var/log",
|
||||
]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.redirect.entrypoints=http",
|
||||
"traefik.http.routers.redirect.rule=Host(`traefik.korhonen.cc`)",
|
||||
"traefik.http.routers.redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.dashboard.entrypoints=https",
|
||||
"traefik.http.routers.dashboard.middlewares=secHeaders@file,compress@file,authentik@file",
|
||||
"traefik.http.routers.dashboard.rule=Host(`traefik.korhonen.cc`)",
|
||||
"traefik.http.routers.dashboard.service=api@internal",
|
||||
]
|
||||
|
||||
[services.fail2ban]
|
||||
image = "crazymax/fail2ban"
|
||||
container_name = "fail2ban"
|
||||
restart = "unless-stopped"
|
||||
network_mode = "host"
|
||||
cap_add = ["NET_ADMIN", "NET_RAW"]
|
||||
environment = ["TZ=Europe/Helsinki"]
|
||||
volumes = [
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
"/docker/traefik/traefik/log:/var/log/traefik:ro",
|
||||
"/docker/traefik/fail2ban:/data",
|
||||
"/docker/forgejo/gitea/log/gitea.log:/var/log/forgejo:ro",
|
||||
"/docker/homeautomation/home-assistant/home-assistant.log:/var/log/hass",
|
||||
"/mnt/Storage/Nextcloud/nextcloud.log:/var/log/nextcloud:ro",
|
||||
]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -1,86 +0,0 @@
|
|||
[http.middlewares.authentik.forwardAuth]
|
||||
address = "http://authentik:9000/outpost.goauthentik.io/auth/traefik"
|
||||
trustForwardHeader = true
|
||||
authResponseHeaders = [
|
||||
"X-authentik-username",
|
||||
"X-authentik-groups",
|
||||
"X-authentik-email",
|
||||
"X-authentik-name",
|
||||
"X-authentik-uid",
|
||||
"X-authentik-jwt",
|
||||
"X-authentik-meta-jwks",
|
||||
"X-authentik-meta-outpost",
|
||||
"X-authentik-meta-provider",
|
||||
"X-authentik-meta-app",
|
||||
"X-authentik-meta-version",
|
||||
]
|
||||
|
||||
[http.middlewares.compress.compress]
|
||||
|
||||
[http.middlewares.http2https.redirectScheme]
|
||||
scheme = "https"
|
||||
permanent = true
|
||||
|
||||
[http.middlewares.secHeaders.headers]
|
||||
browserXssFilter = true
|
||||
contentTypeNosniff = true
|
||||
frameDeny = true
|
||||
sslRedirect = true
|
||||
stsIncludeSubdomains = true
|
||||
stsPreload = true
|
||||
stsSeconds = 31_536_000
|
||||
customFrameOptionsValue = "SAMEORIGIN"
|
||||
referrerPolicy = "strict-origin-when-cross-origin"
|
||||
accesscontrolAllowMethods = ["GET", "OPTIONS", "POST"]
|
||||
accesscontrolAllowOriginList = ["https://korhonen.cc"]
|
||||
accessControlAllowHeaders = [
|
||||
"Accept",
|
||||
"Accept-Encoding",
|
||||
"Accept-Language",
|
||||
"Access-Control-Request-Headers",
|
||||
"Access-Control-Request-Method",
|
||||
"Connection",
|
||||
"Content-Type",
|
||||
"DNT",
|
||||
"Host",
|
||||
"Origin",
|
||||
"Referer",
|
||||
"Sec-Fetch-Dest",
|
||||
"Sec-Fetch-Mode",
|
||||
"Sec-Fetch-Site",
|
||||
"User-Agent",
|
||||
]
|
||||
accesscontrolMaxAge = 100
|
||||
addVaryHeader = true
|
||||
|
||||
[http.middlewares.nextcloud-redirect-dav.redirectRegex]
|
||||
permanent = true
|
||||
regex = "https://cloud.korhonen.cc/.well-known/(card|cal)dav"
|
||||
replacement = "https://cloud.korhonen.cc/remote.php/dav/"
|
||||
|
||||
[http.middlewares.nextcloud-redirect-extra.redirectRegex]
|
||||
permanent = true
|
||||
regex = "https://cloud.korhonen.cc/.well-known/(.*)"
|
||||
replacement = "https://cloud.korhonen.cc/index.php/.well-known/${1}"
|
||||
|
||||
[http.middlewares.nextcloud-security-headers.headers.customResponseHeaders]
|
||||
X-Robots-Tag = "noindex,nofollow"
|
||||
|
||||
[http.middlewares.www2non-www.redirectregex]
|
||||
permanent = true
|
||||
regex = "^https?://www\\.(.+)"
|
||||
replacement = "https://${1}"
|
||||
|
||||
[http.serversTransports.ignorecert]
|
||||
insecureSkipVerify = true
|
||||
|
||||
[tls.options.default]
|
||||
minVersion = "VersionTLS12"
|
||||
cipherSuites = [
|
||||
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
|
||||
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
|
||||
]
|
||||
|
||||
[tls.options.mintls13]
|
||||
minVersion = "VersionTLS13"
|
|
@ -1,41 +0,0 @@
|
|||
[experimental]
|
||||
http3 = true
|
||||
|
||||
[api]
|
||||
dashboard = true
|
||||
|
||||
[entryPoints.http]
|
||||
address = ":80"
|
||||
|
||||
[entryPoints.https]
|
||||
address = ":443"
|
||||
|
||||
[entryPoints.https.http3]
|
||||
|
||||
[entryPoints.https.http.tls]
|
||||
options = "default"
|
||||
certResolver = "letsEncrypt"
|
||||
|
||||
[[entryPoints.https.http.tls.domains]]
|
||||
main = "korhonen.cc"
|
||||
sans = ["*.korhonen.cc"]
|
||||
|
||||
[certificatesResolvers.letsEncrypt.acme]
|
||||
email = "admin@korhonen.cc"
|
||||
storage = "acme.json"
|
||||
|
||||
[certificatesResolvers.letsEncrypt.acme.dnsChallenge]
|
||||
provider = "cloudflare"
|
||||
|
||||
[accessLog]
|
||||
filePath = "/var/log/access.log"
|
||||
|
||||
[accessLog.filters]
|
||||
statusCodes = ["400-499"]
|
||||
|
||||
[providers.docker]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
exposedByDefault = false
|
||||
|
||||
[providers.file]
|
||||
filename = "/dynamic.toml"
|
|
@ -1,33 +1,21 @@
|
|||
[services]
|
||||
[volumes]
|
||||
config = {}
|
||||
picons = {}
|
||||
|
||||
[services.tvheadend]
|
||||
image = "linuxserver/tvheadend"
|
||||
container_name = "tvheadend"
|
||||
environment = ["TZ=Europe/Helsinki", "PUID=1000", "PGID=985"]
|
||||
volumes = [
|
||||
"/docker/tvheadend:/config",
|
||||
"config:/config",
|
||||
"picons:/picons",
|
||||
"/mnt/Storage/Media/PVR:/recordings",
|
||||
"/mnt/Storage/picons:/picons",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
ports = ["9981:9981", "9982:9982"]
|
||||
devices = ["/dev/dvb:/dev/dvb"]
|
||||
restart = "unless-stopped"
|
||||
networks = ["proxy"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.tvheadend-redirect.entrypoints=http",
|
||||
"traefik.http.routers.tvheadend-redirect.rule=Host(`tvheadend.korhonen.cc`)",
|
||||
"traefik.http.routers.tvheadend-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.tvheadend.entrypoints=https",
|
||||
"traefik.http.routers.tvheadend.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.tvheadend.rule=Host(`tvheadend.korhonen.cc`)",
|
||||
"traefik.http.routers.tvheadend.service=tvheadend",
|
||||
"traefik.http.services.tvheadend.loadbalancer.server.port=9981",
|
||||
]
|
||||
|
||||
[networks]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
||||
|
|
|
@ -4,23 +4,10 @@ container_name = "umami"
|
|||
restart = "unless-stopped"
|
||||
networks = ["postgres", "proxy"]
|
||||
env_file = ".env"
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.umami-redirect.entrypoints=http",
|
||||
"traefik.http.routers.umami-redirect.rule=Host(`umami.korhonen.cc`)",
|
||||
"traefik.http.routers.umami-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.umami.entrypoints=https",
|
||||
"traefik.http.routers.umami.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.umami.rule=Host(`umami.korhonen.cc`)",
|
||||
"traefik.http.routers.umami.service=umami",
|
||||
"traefik.http.services.umami.loadbalancer.server.port=3000",
|
||||
]
|
||||
|
||||
[services.umami.environment]
|
||||
DATABASE_URL = "postgresql://umami:${POSTGRES_PASS}@postgres:5432/umami"
|
||||
HASH_SALT = "${HASH_SALT}"
|
||||
TRACKER_SCRIPT_NAME = "ua9quuaW"
|
||||
|
||||
[services.umami.logging.options]
|
||||
max-size = "10m"
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
[services.wkd]
|
||||
image = "nginx"
|
||||
container_name = "wkd"
|
||||
volumes = [
|
||||
"/var/www/wkd:/wkd:ro",
|
||||
"./nginx.conf:/etc/nginx/conf.d/default.conf",
|
||||
]
|
||||
networks = ["proxy"]
|
||||
restart = "unless-stopped"
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.wkd.entrypoints=https",
|
||||
"traefik.http.routers.wkd.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.wkd.rule=Host(`openpgpkey.korhonen.cc`)",
|
||||
"traefik.http.routers.wkd.service=wkd",
|
||||
"traefik.http.services.wkd.loadbalancer.server.port=80",
|
||||
]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
|
@ -1,15 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
root /wkd;
|
||||
|
||||
location /.well-known/openpgpkey/korhonen.cc/hu/ {
|
||||
default_type "application/octet-stream";
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://keyoxide.org/wkd/marko%40korhonen.cc;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
[services.woodpecker]
|
||||
image = "woodpeckerci/woodpecker-server"
|
||||
container_name = "woodpecker"
|
||||
restart = "unless-stopped"
|
||||
volumes = ["/docker/woodpecker/:/var/lib/woodpecker/"]
|
||||
env_file = [".env"]
|
||||
environment = [
|
||||
"WOODPECKER_OPEN=true",
|
||||
"WOODPECKER_GITEA=true",
|
||||
"WOODPECKER_GITEA_URL=https://git.korhonen.cc",
|
||||
"WOODPECKER_GITEA_CLIENT",
|
||||
"WOODPECKER_GITEA_SECRET",
|
||||
"WOODPECKER_AGENT_SECRET",
|
||||
"WOODPECKER_HOST=https://ci.korhonen.cc",
|
||||
"WOODPECKER_ADMIN=FunctionalHacker",
|
||||
]
|
||||
networks = ["proxy", "default"]
|
||||
labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.docker.network=proxy",
|
||||
"traefik.http.routers.woodpecker-redirect.entrypoints=http",
|
||||
"traefik.http.routers.woodpecker-redirect.rule=Host(`ci.korhonen.cc`)",
|
||||
"traefik.http.routers.woodpecker-redirect.middlewares=http2https@file",
|
||||
"traefik.http.routers.woodpecker.entrypoints=https",
|
||||
"traefik.http.routers.woodpecker.middlewares=secHeaders@file,compress@file",
|
||||
"traefik.http.routers.woodpecker.rule=Host(`ci.korhonen.cc`)",
|
||||
"traefik.http.routers.woodpecker.service=woodpecker",
|
||||
"traefik.http.services.woodpecker.loadbalancer.server.port=8000",
|
||||
]
|
||||
|
||||
[services.woodpecker-agent]
|
||||
image = "woodpeckerci/woodpecker-agent"
|
||||
container_name = "woodpecker-agent"
|
||||
command = "agent"
|
||||
restart = "unless-stopped"
|
||||
depends_on = ["woodpecker"]
|
||||
volumes = ["/var/run/docker.sock:/var/run/docker.sock"]
|
||||
env_file = [".env"]
|
||||
environment = [
|
||||
"WOODPECKER_SERVER=woodpecker:9000",
|
||||
"WOODPECKER_AGENT_SECRET",
|
||||
]
|
||||
|
||||
[networks.proxy]
|
||||
external = true
|
1
dotdrop
1
dotdrop
|
@ -1 +0,0 @@
|
|||
Subproject commit aa3defd11752247909e03eaf14da197a6eda90f7
|
0
home/.config/asd
Normal file
0
home/.config/asd
Normal file
|
@ -1,25 +1,21 @@
|
|||
directory: ~/Music
|
||||
library: ~/Music/beets.db
|
||||
plugins:
|
||||
- acousticbrainz
|
||||
- check
|
||||
- edit
|
||||
- fetchart
|
||||
# - follow
|
||||
- fuzzy
|
||||
- info
|
||||
- lastgenre
|
||||
- lyrics
|
||||
- mbcollection
|
||||
# - mbcollection
|
||||
- mpdupdate
|
||||
- play
|
||||
- replaygain
|
||||
- thumbnails
|
||||
- web
|
||||
import:
|
||||
copy: no
|
||||
move: yes
|
||||
link: no
|
||||
write: yes
|
||||
copy: yes
|
||||
lastgenre:
|
||||
whitelist: ~/.config/beets/whitelist
|
||||
lyrics:
|
||||
|
@ -38,9 +34,6 @@ follow:
|
|||
replaygain:
|
||||
backend: gstreamer
|
||||
auto: yes
|
||||
musicbrainz:
|
||||
user: FunctionalHacker
|
||||
pass: "{{@@ env['PASS_MUSICBRAINZ'] @@}}"
|
||||
mbcollection:
|
||||
auto: 'yes'
|
||||
collection: 'a4955b5c-db7f-4e27-9887-f77f820bad34'
|
||||
#mbcollection:
|
||||
# auto: 'yes'
|
||||
# collection: 'a4955b5c-db7f-4e27-9887-f77f820bad34'
|
||||
|
|
|
@ -65,6 +65,7 @@ toggle-maximized=['<Super>f']
|
|||
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
|
||||
screensaver=['<Super>BackSpace']
|
||||
www=['<Super>b']
|
||||
volume-step=1
|
||||
|
||||
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
|
||||
binding='<Super>Return'
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Overpass</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Overpass</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Hack Nerd Font Mono</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Overpass</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Overpass</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Hack Nerd Font Mono</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
||||
|
|
45
home/.config/foot/foot-light.ini
Normal file
45
home/.config/foot/foot-light.ini
Normal file
|
@ -0,0 +1,45 @@
|
|||
pad=10x0
|
||||
dpi-aware=yes
|
||||
|
||||
[scrollback]
|
||||
lines=1000
|
||||
|
||||
[cursor]
|
||||
blink=yes
|
||||
|
||||
[mouse]
|
||||
hide-when-typing=yes
|
||||
|
||||
[colors]
|
||||
foreground = 545464
|
||||
background = f2ecbc
|
||||
|
||||
selection-foreground = 43436c
|
||||
selection-background = c9cbd1
|
||||
|
||||
regular0 = 1F1F28
|
||||
regular1 = c84053
|
||||
regular2 = 6f894e
|
||||
regular3 = 77713f
|
||||
regular4 = 4d699b
|
||||
regular5 = b35b79
|
||||
regular6 = 597b75
|
||||
regular7 = 545464
|
||||
|
||||
bright0 = 8a8980
|
||||
bright1 = d7474b
|
||||
bright2 = 6e915f
|
||||
bright3 = 836f4a
|
||||
bright4 = 6693bf
|
||||
bright5 = 624c83
|
||||
bright6 = 5e857a
|
||||
bright7 = 43436c
|
||||
|
||||
|
||||
16 = cc6d00
|
||||
17 = e82424
|
||||
|
||||
[csd]
|
||||
color = fff2ecbc
|
||||
button-color = ff545464
|
||||
hide-when-maximized = yes
|
|
@ -1,6 +1,5 @@
|
|||
include=~/.cache/wal/colors-foot.ini
|
||||
|
||||
pad=10x0
|
||||
dpi-aware=yes
|
||||
|
||||
[scrollback]
|
||||
lines=1000
|
||||
|
@ -10,3 +9,36 @@ blink=yes
|
|||
|
||||
[mouse]
|
||||
hide-when-typing=yes
|
||||
|
||||
[colors]
|
||||
foreground = dcd7ba
|
||||
background = 1f1f28
|
||||
|
||||
selection-foreground = c8c093
|
||||
selection-background = 2d4f67
|
||||
|
||||
regular0 = 090618
|
||||
regular1 = c34043
|
||||
regular2 = 76946a
|
||||
regular3 = c0a36e
|
||||
regular4 = 7e9cd8
|
||||
regular5 = 957fb8
|
||||
regular6 = 6a9589
|
||||
regular7 = c8c093
|
||||
|
||||
bright0 = 727169
|
||||
bright1 = e82424
|
||||
bright2 = 98bb6c
|
||||
bright3 = e6c384
|
||||
bright4 = 7fb4ca
|
||||
bright5 = 938aa9
|
||||
bright6 = 7aa89f
|
||||
bright7 = dcd7ba
|
||||
|
||||
16 = ffa066
|
||||
17 = ff5d62
|
||||
|
||||
[csd]
|
||||
color = ff1f1f28
|
||||
button-color = ffdcd7ba
|
||||
hide-when-maximized = yes
|
||||
|
|
|
@ -1,56 +1,59 @@
|
|||
[user]
|
||||
{%@@ if profile == "mko-laptop" @@%}
|
||||
email = marko.korhonen@rossum.fi
|
||||
{%@@ else @@%}
|
||||
email = marko@korhonen.cc
|
||||
{%@@ endif @@%}
|
||||
name = Marko Korhonen
|
||||
signingkey = F2B9F713E7ED627336DD85E444FA3F28CD931BB0
|
||||
{%@@ if profile == "mko-laptop" @@%}
|
||||
email = marko.korhonen@rossum.fi
|
||||
{%@@ else @@%}
|
||||
email = marko@korhonen.cc
|
||||
{%@@ endif @@%}
|
||||
name = Marko Korhonen
|
||||
signingkey = F2B9F713E7ED627336DD85E444FA3F28CD931BB0
|
||||
|
||||
[commit]
|
||||
signoff = true
|
||||
gpgsign = true
|
||||
signoff = true
|
||||
gpgsign = true
|
||||
|
||||
[tag]
|
||||
gpgSign = true
|
||||
signoff = true
|
||||
gpgSign = true
|
||||
signoff = true
|
||||
|
||||
[format]
|
||||
signoff = true
|
||||
signoff = true
|
||||
|
||||
[merge]
|
||||
prompt = false
|
||||
conflictstyle = diff3
|
||||
tool = nvim-merge
|
||||
prompt = false
|
||||
conflictstyle = diff3
|
||||
tool = nvim
|
||||
|
||||
[mergetool "nvim-merge"]
|
||||
cmd = nvim -d $LOCAL $BASE $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
|
||||
keepBackup = false
|
||||
[mergetool]
|
||||
keepBackup = false
|
||||
prompt = false
|
||||
|
||||
[diff]
|
||||
prompt = false
|
||||
tool = nvim-diff
|
||||
|
||||
[difftool "nvim-diff"]
|
||||
cmd = nvim -d $LOCAL $REMOTE
|
||||
[mergetool "nvim"]
|
||||
cmd = nvim +DiffviewOpen
|
||||
|
||||
[pull]
|
||||
rebase = merges
|
||||
rebase = merges
|
||||
|
||||
[alias]
|
||||
mergetest = !git switch test && git pull && git merge --no-ff -m \"Merge $1 features to test\" $1
|
||||
upstream = !git push -u origin HEAD
|
||||
sync = !git pull && git push
|
||||
mergetest = !git switch test && git pull && git merge --no-ff -m \"Merge $1 features to test\" $1
|
||||
upstream = !git push -u origin HEAD
|
||||
sync = !git pull && git push
|
||||
recommit = !git commit -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG
|
||||
|
||||
[color]
|
||||
pager = no
|
||||
pager = no
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
defaultBranch = main
|
||||
|
||||
[credential]
|
||||
helper = cache --timeout=600
|
||||
helper = !pass-git-helper $@
|
||||
helper = cache --timeout=600
|
||||
helper = !pass-git-helper $@
|
||||
|
||||
[rerere]
|
||||
enabled = true
|
||||
enabled = true
|
||||
|
||||
[submodule]
|
||||
recurse = true
|
||||
|
||||
[push]
|
||||
recurseSubmodules = check
|
||||
|
|
|
@ -7,7 +7,7 @@ sticker_file "~/.mpd/sticker.sql"
|
|||
|
||||
replaygain "track"
|
||||
|
||||
default_permissions "read"
|
||||
default_permissions "read,add,control"
|
||||
password "{{@@ env['PASS_MPD'] @@}}@read,add,control"
|
||||
password "{{@@ env['PASS_MPD_ADMIN'] @@}}@read,add,control,admin"
|
||||
|
||||
|
|
|
@ -10,9 +10,6 @@ hwdec-codecs=all
|
|||
{%@@ if wayland @@%}
|
||||
gpu-context=wayland
|
||||
{%@@ endif @@%}
|
||||
{%@@ if profile == "mko-laptop" @@%}
|
||||
script=~/.lib/mpris.so
|
||||
{%@@ endif @@%}
|
||||
|
||||
#############
|
||||
# Audio #
|
||||
|
|
16
home/.config/nvim/README.adoc
Normal file
16
home/.config/nvim/README.adoc
Normal file
|
@ -0,0 +1,16 @@
|
|||
= FunctionalHacker's NeoVim configuration
|
||||
|
||||
This is my personal NeoVim configuration I use for all text editing in my free
|
||||
time and at my day job. I mostly code in Java, TypeScript and ReactJS, with
|
||||
a bit of Rust and Python once in a blue moon.
|
||||
|
||||
The configuration is quite minimal but still fully featured. Some highlights
|
||||
include
|
||||
|
||||
* LSP support with neovim's built in LSP client
|
||||
** LSP servers are easily installed and auto-configured with Mason
|
||||
* Treesitter
|
||||
** Code folding
|
||||
** Code highlighting
|
||||
** Text objects
|
||||
* Lazy plugin manager for fast startup times
|
|
@ -1,21 +1,111 @@
|
|||
local nvim_local_dir = vim.fn.expand('~/.local/share/nvim')
|
||||
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t')
|
||||
local workspace_dir = nvim_local_dir .. '/jdtls-workspaces/' .. project_name
|
||||
local nvim_local_dir = vim.fn.expand("~/.local/share/nvim")
|
||||
local mason_packages = nvim_local_dir .. "/mason/packages"
|
||||
local lombok_jar = mason_packages .. "/jdtls/lombok.jar"
|
||||
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
|
||||
local workspace_dir = nvim_local_dir .. "/jdtls-workspaces/" .. project_name
|
||||
local lsp_utils = require("lsp_utils")
|
||||
local jvm = "/usr/lib/jvm"
|
||||
local java_version = 21
|
||||
|
||||
require('jdtls').start_or_attach({
|
||||
cmd = {
|
||||
'/usr/lib/jvm/java-17-openjdk-amd64/bin/java', '-Declipse.application=org.eclipse.jdt.ls.core.id1',
|
||||
'-Dosgi.bundles.defaultStartLevel=4',
|
||||
'-Declipse.product=org.eclipse.jdt.ls.core.product',
|
||||
'-Dlog.protocol=true', '-Dlog.level=ALL', '-Xms1g',
|
||||
'--add-modules=ALL-SYSTEM', '--add-opens',
|
||||
'java.base/java.util=ALL-UNNAMED', '--add-opens',
|
||||
'java.base/java.lang=ALL-UNNAMED', '-jar', nvim_local_dir ..
|
||||
'/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar',
|
||||
'-configuration',
|
||||
nvim_local_dir .. '/mason/packages/jdtls/config_linux', '-data',
|
||||
workspace_dir
|
||||
}
|
||||
require("jdtls").start_or_attach({
|
||||
cmd = {
|
||||
jvm .. "/java-" .. java_version .. "-openjdk-amd64/bin/java",
|
||||
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
||||
"-Dosgi.bundles.defaultStartLevel=4",
|
||||
"-Declipse.product=org.eclipse.jdt.ls.core.product",
|
||||
"-Dlog.protocol=true",
|
||||
"-Dlog.level=ALL",
|
||||
"-Xms1g",
|
||||
"--add-modules=ALL-SYSTEM",
|
||||
"--add-opens",
|
||||
"java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens",
|
||||
"java.base/java.lang=ALL-UNNAMED",
|
||||
"-javaagent:" .. lombok_jar,
|
||||
"-jar",
|
||||
vim.fn.glob(mason_packages .. "/jdtls/plugins/org.eclipse.equinox.launcher_*.jar"),
|
||||
"-configuration",
|
||||
nvim_local_dir .. "/mason/packages/jdtls/config_linux",
|
||||
"-data",
|
||||
workspace_dir,
|
||||
},
|
||||
settings = {
|
||||
java = {
|
||||
signatureHelp = { enabled = true },
|
||||
autobuild = { enabled = false },
|
||||
configuration = {
|
||||
runtimes = {
|
||||
{
|
||||
name = "JavaSE-1.8",
|
||||
path = jvm .. "/java-8-openjdk-amd64/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-11",
|
||||
path = jvm .. "/java-11-openjdk-amd64/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-17",
|
||||
path = jvm .. "/java-17-openjdk-amd64/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-21",
|
||||
path = jvm .. "/java-21-openjdk-amd64/",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
completion = { favoriteStaticMembers = { "java.text.MessageFormat.format" } },
|
||||
handlers = {
|
||||
["language/status"] = function() end,
|
||||
},
|
||||
init_options = {
|
||||
bundles = {
|
||||
vim.fn.glob(mason_packages .. "/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar"),
|
||||
},
|
||||
},
|
||||
capabilities = lsp_utils.get_capabilities(),
|
||||
on_attach = lsp_utils.map_keys,
|
||||
})
|
||||
|
||||
require('plugins.lspconfig').map_keys()
|
||||
function RunJava()
|
||||
local function show_output(output)
|
||||
vim.cmd("split")
|
||||
vim.cmd("enew")
|
||||
vim.fn.append(0, output)
|
||||
--vim.cmd("1d") -- Remove the empty first line
|
||||
vim.bo[0].modifiable = false
|
||||
end
|
||||
|
||||
local filename = vim.fn.expand("%") -- Get the current file name
|
||||
local class_name = vim.fn.fnamemodify(filename, ":r") -- Extract the class name
|
||||
local compile_cmd = "javac " .. filename
|
||||
local run_cmd = "java " .. class_name
|
||||
|
||||
-- Create a temporary file to capture the compile output
|
||||
local temp_file = vim.fn.tempname()
|
||||
|
||||
-- Run the compilation command and save the output to the temporary file
|
||||
local compile_exit_code = vim.fn.system(compile_cmd .. " > " .. temp_file .. " 2>&1")
|
||||
|
||||
-- Check the exit code of the compile command
|
||||
if compile_exit_code == 0 then
|
||||
-- Compilation was successful, run the Java program
|
||||
show_output(vim.fn.systemlist(run_cmd))
|
||||
else
|
||||
-- Compilation failed, display the error output from the temporary file
|
||||
show_output(vim.fn.readfile(temp_file))
|
||||
end
|
||||
|
||||
-- Clean up the temporary file and class file
|
||||
vim.fn.delete(temp_file)
|
||||
vim.fn.delete(vim.fn.expand("%:p:h") .. "/" .. class_name .. ".class")
|
||||
end
|
||||
|
||||
-- Define a VimScript command to execute the Lua function
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
command! RunJava lua RunJava()
|
||||
]],
|
||||
false
|
||||
)
|
||||
|
|
|
@ -1,4 +1,27 @@
|
|||
require("keybinds")
|
||||
-- Install lazy if it's not yet installed
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("settings")
|
||||
require("neovide")
|
||||
require("highlight_yank")
|
||||
require("plugins.init")
|
||||
require("lazy").setup({
|
||||
spec = { import = "plugins" },
|
||||
lockfile = "~/git/dotfiles/home/.config/nvim/lazy-lock.json",
|
||||
performance = {
|
||||
disabled_plugins = { "netrwPlugin" },
|
||||
},
|
||||
defaults = {
|
||||
-- version = "*", -- Disabled for now
|
||||
},
|
||||
})
|
||||
|
|
68
home/.config/nvim/lazy-lock.json
Normal file
68
home/.config/nvim/lazy-lock.json
Normal file
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "de1a287c9cb525ae52bc846e8f6207e5ef1da5ac" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
|
||||
"auto-dark-mode.nvim": { "branch": "master", "commit": "2b8c938da9a7c9432120266b92936b2c22e8cfb8" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "9ae49d71c84b42b91795f7b7cead223c6346e774" },
|
||||
"cder.nvim": { "branch": "main", "commit": "07c9e3e8324ee7c3ffde493c1612aca0be5255d0" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-git": { "branch": "main", "commit": "b9603f18496bc3ca07e6bd474607081af709e750" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"confirm-quit.nvim": { "branch": "main", "commit": "f15f6d728d385a3d2efa22098e9a45b8a2b20144" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
|
||||
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "9bdd5537575c2ea7925b71ae06585b934beea13d" },
|
||||
"dropbar.nvim": { "branch": "master", "commit": "9fc10fa1a34ec3e55b470962e4e94644611bd209" },
|
||||
"firenvim": { "branch": "master", "commit": "fc72687977e1c34259c42f0e408655cf2638760d" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "0de782a6b0ffba599dbd332a4019d852564bf28c" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-extra-cmds": { "branch": "main", "commit": "4d987485b4435bca6d2da735247482f40f839d6b" },
|
||||
"mason-lock.nvim": { "branch": "main", "commit": "2f18cab30f3d621002c58c725d9319a1563414e5" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
||||
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
||||
"mini.nvim": { "branch": "main", "commit": "cd3a08fbf987dabcfded35ebb612e82f8000f92a" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
||||
"neoformat": { "branch": "master", "commit": "34d4d89fea22645b16f69f818dcb7b6b682b0c1a" },
|
||||
"noice.nvim": { "branch": "main", "commit": "9f6f6ba74f8bfbf7e43d6302cf86b070362f6203" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" },
|
||||
"nvim-asciidoc-preview": { "branch": "main", "commit": "e354bd84fed978e31501396aea6154bd97087e07" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "5934302d63d1ede12c0b22b6f23518bb183fc972" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "29255ea26dfb51ef0213f7572bff410f1afb002d" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "223aca86b737dc66e9c51ebcda8788a8d9cc6cf2" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "9bda20fb967075355f253911bc066a8b5a03c77e" },
|
||||
"nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" },
|
||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "d184407e33084f4a57302bc1adf991997ccdd1da" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "cb57b07803476ee902c89412aeff219a9a58be13" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "4b4077850d1b3af09f4957b67144943cf3da401a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
|
||||
"password-store": { "branch": "master", "commit": "b5e965a838bb68c1227caa2cdd874ba496f10149" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b5c8de02a44ffeabff678090edd6a132ff8ab77d" },
|
||||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||
"promise-async": { "branch": "main", "commit": "93540c168c5ed2b030ec3e6c40ab8bbb85e36355" },
|
||||
"statuscol.nvim": { "branch": "main", "commit": "483b9a596dfd63d541db1aa51ee6ee9a1441c4cc" },
|
||||
"suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "0c12735d5aff6a48ffd8111bf144dc2ff44e5975" },
|
||||
"vim-asciidoctor": { "branch": "master", "commit": "f553311b5db03440eb8d7035434d0405e4a2c559" },
|
||||
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },
|
||||
"vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"workspace.checkThirdParty": false
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
local map = vim.keymap.set
|
||||
|
||||
-- Navigate between buffers
|
||||
map("n", "<C-N>", vim.cmd.bn, { silent = true })
|
||||
map("n", "<C-B>", vim.cmd.bp, { silent = true })
|
||||
|
||||
-- Run Neoformat
|
||||
map("n", "<M-f>", vim.cmd.Neoformat, {})
|
||||
|
||||
-- Exit terminal insert mode with esc
|
||||
map("t", "<Esc>", "<C-\\><C-n>", {})
|
64
home/.config/nvim/lua/lsp_utils.lua
Normal file
64
home/.config/nvim/lua/lsp_utils.lua
Normal file
|
@ -0,0 +1,64 @@
|
|||
-- This module contains lsp related
|
||||
-- reusable functions
|
||||
local m = {}
|
||||
|
||||
local lsp = vim.lsp
|
||||
local diagnostic = vim.diagnostic
|
||||
|
||||
-- Maps LSP specific keybinds.
|
||||
-- This makes them only available when LSP is running
|
||||
function m.map_keys()
|
||||
local builtin = require("telescope.builtin")
|
||||
require("which-key").register({
|
||||
g = {
|
||||
name = "Go to",
|
||||
d = { builtin.lsp_definitions, "Definition" },
|
||||
D = { lsp.buf.declaration, "Declaration" },
|
||||
t = { lsp.buf.type_definition, "Type definition" },
|
||||
i = { builtin.lsp_implementations, "Implementation" },
|
||||
r = { builtin.lsp_references, "References" },
|
||||
s = { builtin.lsp_document_symbols, "Symbols" },
|
||||
},
|
||||
["<leader>"] = {
|
||||
name = "Leader",
|
||||
w = {
|
||||
name = "Workspace",
|
||||
a = { lsp.buf.add_workspace_folder, "Add folder" },
|
||||
r = { lsp.buf.remove_workspace_folder, "Remove folder" },
|
||||
l = {
|
||||
function()
|
||||
print(vim.inspect(lsp.buf.list_workspace_folders()))
|
||||
end,
|
||||
"List folders",
|
||||
},
|
||||
},
|
||||
k = { lsp.buf.signature_help, "Signature help" },
|
||||
rn = { lsp.buf.rename, "Rename symbol" },
|
||||
ca = { lsp.buf.code_action, "Code action" },
|
||||
e = { diagnostic.open_float, "Open diagnostics" },
|
||||
F = { lsp.buf.format, "Format with LSP" },
|
||||
},
|
||||
K = { lsp.buf.hover, "Hover" },
|
||||
["["] = { d = { diagnostic.goto_prev, "Previous diagnostic" } },
|
||||
["]"] = { d = { diagnostic.goto_next, "Next diagnostic" } },
|
||||
})
|
||||
end
|
||||
|
||||
-- Combine built-in LSP and cmp cabaibilities
|
||||
-- and additional capabilities from other plugins
|
||||
function m.get_capabilities()
|
||||
local capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
lsp.protocol.make_client_capabilities(),
|
||||
require("cmp_nvim_lsp").default_capabilities()
|
||||
)
|
||||
|
||||
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually for ufo
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
return capabilities
|
||||
end
|
||||
|
||||
return m
|
29
home/.config/nvim/lua/neovide.lua
Normal file
29
home/.config/nvim/lua/neovide.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
local g = vim.g
|
||||
local o = vim.o
|
||||
|
||||
-- Change scale factor with C+ and C-
|
||||
g.neovide_scale_factor = {{@@ scale_factor|default(1.0) @@}}
|
||||
local change_scale_factor = function(delta)
|
||||
g.neovide_scale_factor = g.neovide_scale_factor * delta
|
||||
end
|
||||
vim.keymap.set("n", "<C-+>", function()
|
||||
change_scale_factor(1.25)
|
||||
end)
|
||||
vim.keymap.set("n", "<C-->", function()
|
||||
change_scale_factor(1 / 1.25)
|
||||
end)
|
||||
|
||||
-- Hide mouse when typing in neovide (disabled)
|
||||
g.neovide_hide_mouse_when_typing = false
|
||||
|
||||
-- Enable cursor particles in neovide
|
||||
g.neovide_cursor_vfx_mode = "railgun"
|
||||
|
||||
-- Enable dark/light theme detection
|
||||
g.neovide_theme = "auto"
|
||||
|
||||
-- Confirm quit
|
||||
g.neovide_confirm_quit = true
|
||||
|
||||
-- Set font
|
||||
--o.guifont = "Hack Nerd Font Mono:h15"
|
34
home/.config/nvim/lua/plugins/alpha.lua
Normal file
34
home/.config/nvim/lua/plugins/alpha.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
-- Startup dashboard
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
dashboard.section.header.val = {
|
||||
[[ __ ]],
|
||||
[[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
|
||||
[[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
|
||||
[[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
|
||||
[[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
|
||||
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
|
||||
}
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("<C-f>", "🔍 Find file", "<cmd>Telescope find_files<cr>"),
|
||||
dashboard.button("<C-g>", "𑪢 Grep files", "<cmd>Telescope live_grep<cr>"),
|
||||
dashboard.button("l", "🛋 Lazy", ":Lazy<CR>"),
|
||||
dashboard.button("m", "📦 Mason", ":Mason<CR>"),
|
||||
dashboard.button("q", "ꭙ Quit NeoVim", ":qa<CR>"),
|
||||
}
|
||||
|
||||
-- Fortune in footer
|
||||
dashboard.section.footer.val = require("alpha.fortune")()
|
||||
|
||||
dashboard.config.opts.noautocmd = true
|
||||
|
||||
vim.cmd([[autocmd User AlphaReady echo 'ready']])
|
||||
|
||||
alpha.setup(dashboard.config)
|
||||
end,
|
||||
}
|
15
home/.config/nvim/lua/plugins/asciidoc.lua
Normal file
15
home/.config/nvim/lua/plugins/asciidoc.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
-- AsciiDoc plugins are grouped together here
|
||||
return {
|
||||
-- Vim ♥️ Asciidoctor
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"habamax/vim-asciidoctor",
|
||||
ft = { "asciidoctor", "asciidoc" },
|
||||
},
|
||||
-- AsciiDoc preview
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"tigion/nvim-asciidoc-preview",
|
||||
ft = { "asciidoctor", "asciidoc" },
|
||||
},
|
||||
}
|
6
home/.config/nvim/lua/plugins/autopairs.lua
Normal file
6
home/.config/nvim/lua/plugins/autopairs.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Automatic brackets
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
config = true
|
||||
}
|
16
home/.config/nvim/lua/plugins/bufferline.lua
Normal file
16
home/.config/nvim/lua/plugins/bufferline.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
-- Bufferline
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
--- @type BufferlineConfig
|
||||
opts = {
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(count, level)
|
||||
local icon = level:match("error") and " " or " "
|
||||
return " " .. icon .. count
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
6
home/.config/nvim/lua/plugins/caddyfile.lua
Normal file
6
home/.config/nvim/lua/plugins/caddyfile.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Caddyfile syntax support
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"isobit/vim-caddyfile",
|
||||
ft = "caddyfile",
|
||||
}
|
|
@ -1,88 +1,137 @@
|
|||
return function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
if not cmp then
|
||||
return
|
||||
end
|
||||
|
||||
-- Setup git completion source
|
||||
require("cmp_git").setup()
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
-- Autoompletion
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", -- Buffer source
|
||||
-- Git source
|
||||
{
|
||||
"petertriho/cmp-git",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = true,
|
||||
},
|
||||
mapping = {
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
["<Tab>"] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
["<S-Tab>"] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
"hrsh7th/cmp-nvim-lsp", -- LSP source
|
||||
"hrsh7th/cmp-nvim-lua", -- Neovim Lua API documentation source
|
||||
"hrsh7th/cmp-path", -- Path source
|
||||
"hrsh7th/cmp-cmdline", -- cmdline source
|
||||
"saadparwaiz1/cmp_luasnip", -- Snippets source
|
||||
"f3fora/cmp-spell", -- Spell check source
|
||||
-- Copilot source
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
opts = { fix_pairs = true },
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "git" },
|
||||
{ name = "buffer" },
|
||||
{ name = "spell" },
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
-- Enable autopairs when enter is processed
|
||||
-- on completion
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
local has_words_before = function()
|
||||
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
|
||||
|
||||
-- `/` cmdline setup.
|
||||
cmp.setup.cmdline("/", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{
|
||||
name = "cmdline",
|
||||
option = {
|
||||
ignore_cmds = { "Man", "!" },
|
||||
},
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
}),
|
||||
})
|
||||
end
|
||||
mapping = {
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
-- Snippet placeholder forward
|
||||
["<C-f>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
-- Snippet placeholder backward
|
||||
["<C-b>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
-- Completion menu forward
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
-- If only one entry, select it
|
||||
if #cmp.get_entries() == 1 then
|
||||
cmp.confirm({ select = true })
|
||||
else
|
||||
cmp.select_next_item()
|
||||
end
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
if #cmp.get_entries() == 1 then
|
||||
cmp.confirm({ select = true })
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
-- Completion menu backward
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = "luasnip" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "git" },
|
||||
{ name = "copilot" },
|
||||
{ name = "buffer" },
|
||||
{ name = "spell" },
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable autopairs when enter is processed
|
||||
-- on completion
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
||||
-- `/` cmdline setup.
|
||||
cmp.setup.cmdline("/", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{
|
||||
name = "cmdline",
|
||||
option = {
|
||||
ignore_cmds = { "Man", "!" },
|
||||
},
|
||||
},
|
||||
}),
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
10
home/.config/nvim/lua/plugins/confirm-quit.lua
Normal file
10
home/.config/nvim/lua/plugins/confirm-quit.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
-- Confirm before quit
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
enabled = vim.g.neovide == not nil,
|
||||
"yutkat/confirm-quit.nvim",
|
||||
event = "CmdlineEnter",
|
||||
opts = {
|
||||
quit_message = "You are in Neovide, are you sure you want to quit?",
|
||||
},
|
||||
}
|
9
home/.config/nvim/lua/plugins/copilot.lua
Normal file
9
home/.config/nvim/lua/plugins/copilot.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- GitHub Copilot
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"zbirenbaum/copilot.lua",
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
},
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
return function()
|
||||
local dap = require("dap")
|
||||
|
||||
dap.adapters.bashdb = {
|
||||
type = "executable",
|
||||
command = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/bash-debug-adapter",
|
||||
name = "bashdb",
|
||||
}
|
||||
|
||||
dap.configurations.sh = {
|
||||
{
|
||||
type = "bashdb",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
showDebugOutput = true,
|
||||
pathBashdb = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb",
|
||||
pathBashdbLib = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/extension/bashdb_dir",
|
||||
trace = true,
|
||||
file = "${file}",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
pathCat = "cat",
|
||||
pathBash = "/bin/bash",
|
||||
pathMkfifo = "mkfifo",
|
||||
pathPkill = "pkill",
|
||||
args = {},
|
||||
env = {},
|
||||
terminalKind = "integrated",
|
||||
},
|
||||
}
|
||||
end
|
3
home/.config/nvim/lua/plugins/diffview.lua
Normal file
3
home/.config/nvim/lua/plugins/diffview.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
-- Improved diffs
|
||||
--- @type LazyPluginSpec
|
||||
return { "sindrets/diffview.nvim" }
|
6
home/.config/nvim/lua/plugins/dropbar.lua
Normal file
6
home/.config/nvim/lua/plugins/dropbar.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Show the current LSP context in winbar
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
enabled = vim.fn.has("nvim-0.10") == 1,
|
||||
"Bekaboo/dropbar.nvim",
|
||||
}
|
17
home/.config/nvim/lua/plugins/firenvim.lua
Normal file
17
home/.config/nvim/lua/plugins/firenvim.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
-- Neovim inside Firefox
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"glacambre/firenvim",
|
||||
build = function()
|
||||
vim.fn["firenvim#install"](0)
|
||||
end,
|
||||
config = function()
|
||||
vim.g.firenvim_config = {
|
||||
localSettings = {
|
||||
[".*"] = {
|
||||
takeOver = "never",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
3
home/.config/nvim/lua/plugins/fugitive.lua
Normal file
3
home/.config/nvim/lua/plugins/fugitive.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
-- Git commands
|
||||
--- @type LazyPluginSpec
|
||||
return { "tpope/vim-fugitive" }
|
6
home/.config/nvim/lua/plugins/gnupg.lua
Normal file
6
home/.config/nvim/lua/plugins/gnupg.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Edit GPG encrypted files transparently
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"jamessan/vim-gnupg",
|
||||
ft = { "gpg" },
|
||||
}
|
|
@ -1,8 +1,24 @@
|
|||
return function()
|
||||
vim.opt.list = true
|
||||
require("indent_blankline").setup({
|
||||
space_char_blankline = " ",
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
})
|
||||
end
|
||||
-- Indent characters
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
--- @type ibl.config
|
||||
opts = {
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"",
|
||||
"checkhealth",
|
||||
"alpha",
|
||||
"git",
|
||||
"gitcommit",
|
||||
"TelescopePrompt",
|
||||
"TelescopeResults",
|
||||
"help",
|
||||
"lazy",
|
||||
"lspinfo",
|
||||
"man",
|
||||
},
|
||||
},
|
||||
},
|
||||
main = "ibl",
|
||||
}
|
||||
|
|
|
@ -1,210 +0,0 @@
|
|||
-- Install lazy if it's not yet installed
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Configure lazy
|
||||
local plugins = {
|
||||
-- Colorscheme
|
||||
{
|
||||
"rebelot/kanagawa.nvim",
|
||||
config = function()
|
||||
vim.cmd("colorscheme kanagawa")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Statusline
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Git status in signcolumn
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Tabline/bufferline
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "v3.*",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Git commands
|
||||
"tpope/vim-fugitive",
|
||||
|
||||
-- Indent characters
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
config = require("plugins.indent-blankline"),
|
||||
},
|
||||
|
||||
-- Tree explorer
|
||||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
config = require("plugins.nvim-tree"),
|
||||
},
|
||||
|
||||
-- Telescope
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = require("plugins.telescope"),
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- Internal dep for telescope
|
||||
-- Use fzf for fuzzy finder
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
},
|
||||
"nvim-telescope/telescope-ui-select.nvim", -- Replace vim built in select with telescope
|
||||
"zane-/cder.nvim", -- cd plugin for telescope
|
||||
},
|
||||
},
|
||||
|
||||
-- Do stuff as sudo
|
||||
"lambdalisue/suda.vim",
|
||||
|
||||
-- Display possible keybinds
|
||||
{ "folke/which-key.nvim", config = true },
|
||||
|
||||
-- Read editorconfig settings
|
||||
"editorconfig/editorconfig-vim",
|
||||
|
||||
-- Package manager for LSP servers, DAP adapters etc.
|
||||
{ "williamboman/mason.nvim", config = true },
|
||||
|
||||
-- Install LSP server executables with Mason
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = true,
|
||||
},
|
||||
|
||||
{
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Configs for built-in LSP
|
||||
{ "neovim/nvim-lspconfig", config = require("plugins.lspconfig").setup },
|
||||
|
||||
-- Additional LSP features for Java
|
||||
"mfussenegger/nvim-jdtls",
|
||||
|
||||
-- DAP plugin
|
||||
{ "mfussenegger/nvim-dap", config = require("plugins.dap") },
|
||||
|
||||
-- Display function signature
|
||||
"ray-x/lsp_signature.nvim",
|
||||
|
||||
-- Snippets plugin
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = { "rafamadriz/friendly-snippets" }, -- Snippets collection
|
||||
config = require("plugins.luasnip"),
|
||||
},
|
||||
|
||||
-- vim api documentation for lua lsp
|
||||
"ii14/emmylua-nvim",
|
||||
|
||||
-- Completion
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", -- Buffer source
|
||||
{ "petertriho/cmp-git", dependencies = { "nvim-lua/plenary.nvim" } }, -- Git source
|
||||
"hrsh7th/cmp-nvim-lsp", -- LSP source
|
||||
"hrsh7th/cmp-nvim-lua", -- Neovim Lua API documentation source
|
||||
"hrsh7th/cmp-path", -- Path source
|
||||
"hrsh7th/cmp-cmdline", -- cmdline source
|
||||
"saadparwaiz1/cmp_luasnip", -- Snippets source
|
||||
"f3fora/cmp-spell", -- Spell check source
|
||||
},
|
||||
config = require("plugins.cmp"),
|
||||
},
|
||||
|
||||
-- Automatic brackets
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = function()
|
||||
require("nvim-treesitter.install").update({ with_sync = true })
|
||||
end,
|
||||
config = require("plugins.treesitter"),
|
||||
},
|
||||
|
||||
-- treesitter plugin for commentstring
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
|
||||
-- mappings for commenting in code
|
||||
"tpope/vim-commentary",
|
||||
|
||||
-- we all know this one
|
||||
"tpope/vim-surround",
|
||||
|
||||
-- Formatter plugin
|
||||
"sbdchd/neoformat",
|
||||
|
||||
-- Make editing passwords safer
|
||||
{
|
||||
"https://git.zx2c4.com/password-store",
|
||||
config = function(plugin)
|
||||
vim.opt.rtp:append(plugin.dir .. "contrib/vim/redact_pass.vim")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Neovim inside Firefox
|
||||
{
|
||||
"glacambre/firenvim",
|
||||
build = function()
|
||||
vim.fn["firenvim#install"](0)
|
||||
end,
|
||||
},
|
||||
|
||||
-- Vim <3 Asciidoctor
|
||||
"habamax/vim-asciidoctor",
|
||||
|
||||
-- Asciidoc preview
|
||||
{ "tigion/nvim-asciidoc-preview", ft = { "asciidoctor" } },
|
||||
|
||||
-- Markdown preview
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = "cd app && npm install",
|
||||
config = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
|
||||
-- Edit GPG encrypted files transparently
|
||||
"jamessan/vim-gnupg",
|
||||
|
||||
-- High performance color highlighter
|
||||
{
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = true,
|
||||
},
|
||||
}
|
||||
|
||||
local lazy_opts = {}
|
||||
|
||||
require("lazy").setup(plugins, lazy_opts)
|
56
home/.config/nvim/lua/plugins/kanagawa.lua
Normal file
56
home/.config/nvim/lua/plugins/kanagawa.lua
Normal file
|
@ -0,0 +1,56 @@
|
|||
-- Colorscheme
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"rebelot/kanagawa.nvim",
|
||||
dependencies = { { "f-person/auto-dark-mode.nvim", config = true } },
|
||||
--- @type KanagawaConfig
|
||||
opts = {
|
||||
compile = true,
|
||||
dimInactive = true,
|
||||
colors = {
|
||||
theme = {
|
||||
all = {
|
||||
ui = {
|
||||
bg_gutter = "none", -- Hide gutter background
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
background = {
|
||||
dark = "wave",
|
||||
light = "lotus",
|
||||
},
|
||||
overrides = function(colors)
|
||||
local theme = colors.theme
|
||||
return {
|
||||
-- Transparent floating windows
|
||||
NormalFloat = { bg = "none" },
|
||||
FloatBorder = { bg = "none" },
|
||||
FloatTitle = { bg = "none" },
|
||||
NormalDark = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 },
|
||||
LazyNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
MasonNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
|
||||
-- Block-like modern Telescope UI
|
||||
TelescopeTitle = { fg = theme.ui.special, bold = true },
|
||||
TelescopePromptNormal = { bg = theme.ui.bg_p1 },
|
||||
TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 },
|
||||
TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 },
|
||||
TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 },
|
||||
TelescopePreviewNormal = { bg = theme.ui.bg_dim },
|
||||
TelescopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim },
|
||||
|
||||
-- More uniform look for the popup menu
|
||||
Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1, blend = vim.o.pumblend },
|
||||
PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 },
|
||||
PmenuSbar = { bg = theme.ui.bg_m1 },
|
||||
PmenuThumb = { bg = theme.ui.bg_p2 },
|
||||
}
|
||||
end,
|
||||
},
|
||||
--- @param opts KanagawaConfig
|
||||
config = function(_, opts)
|
||||
require("kanagawa").setup(opts)
|
||||
vim.cmd("colorscheme kanagawa")
|
||||
end,
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
-- Pairs of server name and settings.
|
||||
-- This is iterated through and every
|
||||
-- server is setup with lspconfig
|
||||
local servers = {
|
||||
bashls = {},
|
||||
html = {},
|
||||
jsonls = {},
|
||||
lemminx = {},
|
||||
marksman = {},
|
||||
yamlls = {},
|
||||
taplo = {},
|
||||
tsserver = {},
|
||||
eslint = {},
|
||||
rust_analyzer = {},
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = "LuaJIT",
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local m = {}
|
||||
|
||||
function m.map_keys()
|
||||
-- Register keybindings via which-key
|
||||
-- to get documentation in which-key
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
g = {
|
||||
name = "Go to",
|
||||
d = { vim.lsp.buf.definition, "Definition" },
|
||||
D = { vim.lsp.buf.declaration, "Declaration" },
|
||||
i = { vim.lsp.buf.implementation, "Implementation" },
|
||||
r = { vim.lsp.buf.references, "References" },
|
||||
},
|
||||
["<leader>"] = {
|
||||
name = "Leader",
|
||||
w = {
|
||||
name = "Workspace",
|
||||
a = { vim.lsp.buf.add_workspace_folder, "Add folder" },
|
||||
r = { vim.lsp.buf.remove_workspace_folder, "Remove folder" },
|
||||
l = {
|
||||
function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end,
|
||||
"List folders",
|
||||
},
|
||||
},
|
||||
D = { vim.lsp.buf.type_definition, "Type definition" },
|
||||
rn = { vim.lsp.buf.rename, "Rename symbol" },
|
||||
ca = { vim.lsp.buf.code_action, "Code action" },
|
||||
e = { vim.diagnostic.open_float, "Open diagnostics" },
|
||||
f = { vim.lsp.buf.format, "Format" },
|
||||
},
|
||||
K = { vim.lsp.buf.hover, "Hover" },
|
||||
["["] = { d = { vim.diagnostic.goto_prev, "Previous diagnostic" } },
|
||||
["]"] = { d = { vim.diagnostic.goto_next, "Next diagnostic" } },
|
||||
})
|
||||
end
|
||||
|
||||
function m.setup()
|
||||
local function on_attach()
|
||||
-- Setup lsp signature plugin
|
||||
require("lsp_signature").setup({})
|
||||
|
||||
-- Setup keybinds
|
||||
m.map_keys()
|
||||
end
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
-- Setup every defined server
|
||||
for server, settings in pairs(servers) do
|
||||
require("lspconfig")[server].setup({
|
||||
on_attach = on_attach,
|
||||
settings = settings,
|
||||
-- Inform lsp server about client
|
||||
-- capabilities
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
return m
|
7
home/.config/nvim/lua/plugins/lualine.lua
Normal file
7
home/.config/nvim/lua/plugins/lualine.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
-- Statusline
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
config = true,
|
||||
}
|
|
@ -1,23 +1,18 @@
|
|||
return function()
|
||||
local luasnip = require("luasnip")
|
||||
local wk = require("which-key")
|
||||
-- Snippets plugin
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
-- Snippets collection
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
config = function()
|
||||
local vsCodeLoader = require("luasnip/loaders/from_vscode")
|
||||
|
||||
-- load friendly-snippets to luasnip
|
||||
require("luasnip/loaders/from_vscode").lazy_load()
|
||||
-- Load friendly-snippets
|
||||
vsCodeLoader.lazy_load()
|
||||
|
||||
-- Register snippet navigation keybindings
|
||||
local snippet_mappings = {
|
||||
["<c-j>"] = {
|
||||
function()
|
||||
luasnip.jump(1)
|
||||
end,
|
||||
},
|
||||
["<c-k>"] = {
|
||||
function()
|
||||
luasnip.jump(-1)
|
||||
end,
|
||||
},
|
||||
}
|
||||
--wk.register(snippet_mappings, {mode = "i"})
|
||||
--wk.register(snippet_mappings, {mode = "s"})
|
||||
end
|
||||
-- Load my custom snippets
|
||||
vsCodeLoader.lazy_load({
|
||||
paths = { "./snippets" },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
10
home/.config/nvim/lua/plugins/markdown-preview.lua
Normal file
10
home/.config/nvim/lua/plugins/markdown-preview.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
-- Markdown preview
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = "cd app && yarn install",
|
||||
config = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
}
|
60
home/.config/nvim/lua/plugins/mason.lua
Normal file
60
home/.config/nvim/lua/plugins/mason.lua
Normal file
|
@ -0,0 +1,60 @@
|
|||
-- Package manager for LSP servers, DAP adapters etc.
|
||||
-- It also handles starting all of my LSP servers
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- Add MasonUpdateAll
|
||||
{ "Zeioth/mason-extra-cmds", config = true },
|
||||
-- Add lockfile support
|
||||
{
|
||||
"zapling/mason-lock.nvim",
|
||||
opts = {
|
||||
lockfile_path = vim.fn.expand("~/git/dotfiles/home/.config/nvim/mason-lock.json"),
|
||||
},
|
||||
},
|
||||
-- Extended functionality for jdtls
|
||||
"mfussenegger/nvim-jdtls",
|
||||
-- Add support for LSP file operations
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
|
||||
local mlspc = require("mason-lspconfig")
|
||||
local lsp_utils = require("lsp_utils")
|
||||
|
||||
local commonLspConfigArgs = {
|
||||
on_attach = lsp_utils.map_keys,
|
||||
capabilities = lsp_utils.get_capabilities(),
|
||||
}
|
||||
|
||||
mlspc.setup()
|
||||
mlspc.setup_handlers({
|
||||
-- Default handler
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup(commonLspConfigArgs)
|
||||
end,
|
||||
|
||||
-- Disable tsserver diagnostics diagnostics
|
||||
-- that come from ESLint
|
||||
["tsserver"] = function()
|
||||
require("lspconfig").tsserver.setup(vim.tbl_extend("force", commonLspConfigArgs, {
|
||||
settings = {
|
||||
diagnostics = {
|
||||
ignoredCodes = {
|
||||
6133, -- Unused variable
|
||||
6192, -- Unused import
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
end,
|
||||
|
||||
-- Don't set up jdtls, it is set up by nvim-jdtls
|
||||
["jdtls"] = function() end,
|
||||
})
|
||||
end,
|
||||
}
|
9
home/.config/nvim/lua/plugins/mini.lua
Normal file
9
home/.config/nvim/lua/plugins/mini.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- Library of 30+ independent Lua modules improving overall Neovim
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"echasnovski/mini.nvim",
|
||||
config = function()
|
||||
require("mini.surround").setup()
|
||||
require("mini.comment").setup()
|
||||
end,
|
||||
}
|
14
home/.config/nvim/lua/plugins/neodev.lua
Normal file
14
home/.config/nvim/lua/plugins/neodev.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
-- Neovim setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API.
|
||||
return {
|
||||
"folke/neodev.nvim",
|
||||
--- @type LuaDevOptions
|
||||
opts = {
|
||||
override = function(root_dir, library)
|
||||
local dotfiles_path = tostring(vim.fn.expand("~/git/dotfiles"))
|
||||
if string.find(root_dir, dotfiles_path, 1, true) then
|
||||
library.enabled = true
|
||||
library.plugins = { "nvim-dap-ui" }
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
12
home/.config/nvim/lua/plugins/neoformat.lua
Normal file
12
home/.config/nvim/lua/plugins/neoformat.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
-- Formatter plugin
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"sbdchd/neoformat",
|
||||
keys = {
|
||||
{
|
||||
desc = "Format with Neoformat",
|
||||
"<leader>f",
|
||||
"<cmd>Neoformat<cr>",
|
||||
},
|
||||
},
|
||||
}
|
30
home/.config/nvim/lua/plugins/noice.lua
Normal file
30
home/.config/nvim/lua/plugins/noice.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
-- Replace much of neovim's default UI
|
||||
-- with a modern replacement
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
|
||||
--- @type NoiceConfig
|
||||
opts = {
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true,
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
-- add a border to hover docs and signature help
|
||||
lsp_doc_border = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
desc = "Dismiss notifications",
|
||||
"<leader>d",
|
||||
"<cmd>NoiceDismiss<cr>",
|
||||
},
|
||||
},
|
||||
}
|
6
home/.config/nvim/lua/plugins/nvim-colorizer.lua
Normal file
6
home/.config/nvim/lua/plugins/nvim-colorizer.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- High performance color highlighter
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = true,
|
||||
}
|
123
home/.config/nvim/lua/plugins/nvim-dap.lua
Normal file
123
home/.config/nvim/lua/plugins/nvim-dap.lua
Normal file
|
@ -0,0 +1,123 @@
|
|||
-- Debug adapter for NeoVim
|
||||
|
||||
local masonPkg = vim.fn.stdpath("data") .. "/mason/packages"
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
dependencies = { "nvim-neotest/nvim-nio" },
|
||||
config = true,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local configurations = dap.configurations
|
||||
local adapters = dap.adapters
|
||||
local pick_process = require("dap.utils").pick_process
|
||||
|
||||
-- Applies all given configurations to the given filetypes
|
||||
--- @param filetypes string[]
|
||||
--- @param configs Configuration[]
|
||||
local function dapConfigure(filetypes, configs)
|
||||
for _, ft in ipairs(filetypes) do
|
||||
configurations[ft] = configs
|
||||
end
|
||||
end
|
||||
|
||||
-- Bash/sh
|
||||
local bashAdapter = masonPkg .. "/bash-debug-adapter"
|
||||
local bashExtension = bashAdapter .. "/extension"
|
||||
adapters.bashdb = {
|
||||
type = "executable",
|
||||
command = bashAdapter .. "/bash-debug-adapter",
|
||||
name = "bashdb",
|
||||
}
|
||||
configurations.sh = {
|
||||
name = "Debug with bashdb",
|
||||
type = "bashdb",
|
||||
request = "launch",
|
||||
showDebugOutput = true,
|
||||
trace = true,
|
||||
pathBashdbLib = bashExtension .. "/bashdb_dir",
|
||||
pathBashdb = bashExtension .. "/bashdb_dir/bashdb",
|
||||
file = "${file}",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
pathCat = "cat",
|
||||
pathBash = "/bin/bash",
|
||||
pathMkfifo = "mkfifo",
|
||||
pathPkill = "pkill",
|
||||
args = {},
|
||||
env = {},
|
||||
terminalKind = "integrated",
|
||||
}
|
||||
|
||||
-- JavaScript/TypeScript in Firefox/Chrome/Node
|
||||
adapters.libreWolf = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
args = { masonPkg .. "/firefox-debug-adapter/dist/adapter.bundle.js" },
|
||||
}
|
||||
adapters["pwa-node"] = {
|
||||
type = "server",
|
||||
host = "localhost",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "node",
|
||||
args = { masonPkg .. "/js-debug-adapter/js-debug/src/dapDebugServer.js", "8123" },
|
||||
},
|
||||
}
|
||||
|
||||
--- @type Configuration[]
|
||||
local browserConfigs = {
|
||||
{
|
||||
name = "LibreWolf attach",
|
||||
type = "libreWolf",
|
||||
request = "attach",
|
||||
url = "http://localhost:4000",
|
||||
webRoot = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
name = "Chrome attach",
|
||||
type = "pwa-chrome",
|
||||
request = "attach",
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
||||
--- @type Configuration[]
|
||||
local nodeConfigs = {
|
||||
{
|
||||
name = "Node attach",
|
||||
type = "pwa-node",
|
||||
request = "attach",
|
||||
processId = pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
name = "Node launch",
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
port = "8123",
|
||||
},
|
||||
}
|
||||
|
||||
dapConfigure({ "typescriptreact", "javascriptreact" }, browserConfigs)
|
||||
dapConfigure({ "typescript", "javascript" }, vim.tbl_extend("force", browserConfigs, nodeConfigs))
|
||||
|
||||
-- Java
|
||||
configurations.java = {
|
||||
{
|
||||
name = "Debug (Attach) - Remote",
|
||||
type = "java",
|
||||
request = "attach",
|
||||
hostName = "127.0.0.1",
|
||||
port = 9009,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,13 +1,26 @@
|
|||
return function()
|
||||
require("nvim-tree").setup({ -- BEGIN_DEFAULT_OPTS
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
},
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
},
|
||||
})
|
||||
-- Open/close with alt-o
|
||||
vim.keymap.set("n", "<M-o>", vim.cmd.NvimTreeToggle)
|
||||
end
|
||||
-- Tree explorer
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
lazy = false,
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
opts = {
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
},
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
desc = "Open/close nvim-tree",
|
||||
"<leader>o",
|
||||
"<cmd>NvimTreeToggle<cr>",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
8
home/.config/nvim/lua/plugins/redact_pass.lua
Normal file
8
home/.config/nvim/lua/plugins/redact_pass.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
-- Make editing passwords safer
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"https://git.zx2c4.com/password-store",
|
||||
config = function(plugin)
|
||||
vim.opt.rtp:append(plugin.dir .. "contrib/vim/redact_pass.vim")
|
||||
end,
|
||||
}
|
28
home/.config/nvim/lua/plugins/statuscol.lua
Normal file
28
home/.config/nvim/lua/plugins/statuscol.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- Customize statuscolumn
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"luukvbaal/statuscol.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = true,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local gitsigns = require("gitsigns")
|
||||
require("which-key").register({
|
||||
["["] = { h = { gitsigns.prev_hunk, "Previous hunk" } },
|
||||
["]"] = { h = { gitsigns.next_hunk, "Next hunk" } },
|
||||
})
|
||||
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
relculright = true,
|
||||
segments = {
|
||||
{ text = { builtin.foldfunc }, click = "v:lua.ScFa" },
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
3
home/.config/nvim/lua/plugins/suda.lua
Normal file
3
home/.config/nvim/lua/plugins/suda.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
-- Do stuff as sudo
|
||||
--- @type LazyPluginSpec
|
||||
return { "lambdalisue/suda.vim" }
|
|
@ -1,17 +1,105 @@
|
|||
return function()
|
||||
local telescope = require("telescope")
|
||||
local builtin = require("telescope.builtin")
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
-- Internal dependency for telescope
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
telescope.setup({
|
||||
pickers = { find_files = { find_command = { "fd", "-Ht", "f" } } },
|
||||
})
|
||||
-- Use fzf for fuzzy finder
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
},
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("cder")
|
||||
-- Replace vim built in select with telescope
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
|
||||
-- Keybinds
|
||||
vim.keymap.set("n", "<C-t>", vim.cmd.Telescope)
|
||||
vim.keymap.set("n", "<C-f>", builtin.find_files)
|
||||
vim.keymap.set("n", "<C-g>", builtin.live_grep)
|
||||
end
|
||||
-- cd plugin for telescope
|
||||
"zane-/cder.nvim",
|
||||
|
||||
-- Switch to a project
|
||||
{
|
||||
"ahmedkhalf/project.nvim",
|
||||
main = "project_nvim",
|
||||
opts = {
|
||||
patterns = { ".git" },
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
-- Set layout to vertical
|
||||
defaults = {
|
||||
layout_strategy = "vertical",
|
||||
layout_defaults = {
|
||||
vertical = {
|
||||
preview_height = 0.5,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = { find_command = { "fd", "-Ht", "f" } },
|
||||
lsp_references = { show_line = false },
|
||||
live_grep = {
|
||||
additional_args = function()
|
||||
return { "--hidden" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
cder = {
|
||||
previewer_command = "eza "
|
||||
.. "-a "
|
||||
.. "--color=always "
|
||||
.. "-T "
|
||||
.. "--level=3 "
|
||||
.. "--icons "
|
||||
.. "--git-ignore "
|
||||
.. "--long "
|
||||
.. "--no-permissions "
|
||||
.. "--no-user "
|
||||
.. "--no-filesize "
|
||||
.. "--git "
|
||||
.. "--ignore-glob=.git",
|
||||
dir_command = { "fd", "-Ht", "d", ".", os.getenv("HOME") },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
desc = "Open Telescope",
|
||||
"t",
|
||||
"<cmd>Telescope<cr>",
|
||||
},
|
||||
{
|
||||
desc = "Change directories",
|
||||
"cd",
|
||||
"<cmd>Telescope cder<cr>",
|
||||
},
|
||||
{
|
||||
desc = "Find files",
|
||||
"<C-f>",
|
||||
"<cmd>Telescope find_files<cr>",
|
||||
},
|
||||
{
|
||||
desc = "Grep files",
|
||||
"<C-g>",
|
||||
"<cmd>Telescope live_grep<cr>",
|
||||
},
|
||||
{
|
||||
desc = "Change to a project",
|
||||
"<leader>p",
|
||||
"<cmd>Telescope projects<cr>",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
telescope.setup(opts)
|
||||
|
||||
-- Load extensions
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("cder")
|
||||
telescope.load_extension("projects")
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,37 +1,153 @@
|
|||
return function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"html",
|
||||
"http",
|
||||
"java",
|
||||
"json",
|
||||
"json5",
|
||||
"latex",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"php",
|
||||
"python",
|
||||
"regex",
|
||||
"rasi",
|
||||
"rst",
|
||||
"scss",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"javascript",
|
||||
"yaml",
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
})
|
||||
return {
|
||||
-- Improved syntax highlighting, text objects and more
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
init = function()
|
||||
require("nvim-treesitter.install").update({
|
||||
with_sync = true,
|
||||
})
|
||||
end,
|
||||
--- @type TSConfig
|
||||
opts = {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"css",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"html",
|
||||
"http",
|
||||
"java",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"json5",
|
||||
"jsonc",
|
||||
"latex",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"php",
|
||||
"python",
|
||||
"query",
|
||||
"rasi",
|
||||
"regex",
|
||||
"rst",
|
||||
"scss",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
move = {
|
||||
enable = true,
|
||||
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
|
||||
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" },
|
||||
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" },
|
||||
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
|
||||
},
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = {
|
||||
query = "@function.outer",
|
||||
desc = "Select outer part of a function",
|
||||
},
|
||||
["if"] = {
|
||||
query = "@function.inner",
|
||||
desc = "Select inner part of a function",
|
||||
},
|
||||
["ac"] = {
|
||||
query = "@class.outer",
|
||||
desc = "Select outer part of a class",
|
||||
},
|
||||
["ic"] = {
|
||||
query = "@class.inner",
|
||||
desc = "Select inner part of a class",
|
||||
},
|
||||
["as"] = {
|
||||
query = "@scope",
|
||||
query_group = "locals",
|
||||
desc = "Select language scope",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
--- @param opts TSConfig
|
||||
config = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
--- @type table<string, boolean>
|
||||
local added = {}
|
||||
opts.ensure_installed = vim.tbl_filter(function(lang)
|
||||
if added[lang] then
|
||||
return false
|
||||
end
|
||||
added[lang] = true
|
||||
return true
|
||||
end, opts.ensure_installed)
|
||||
end
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
config = function()
|
||||
-- When in diff mode, we want to use the default
|
||||
-- vim text objects c & C instead of the treesitter ones.
|
||||
--- @type table<string,fun(...)>
|
||||
local move = require("nvim-treesitter.textobjects.move")
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
for name, fn in pairs(move) do
|
||||
if name:find("goto") == 1 then
|
||||
move[name] = function(q, ...)
|
||||
if vim.wo.diff then
|
||||
--- @type table<string,string>
|
||||
local config = configs.get_module("textobjects.move")[name]
|
||||
for key, query in pairs(config or {}) do
|
||||
if q == query and key:find("[%]%[][cC]") then
|
||||
vim.cmd("normal! " .. key)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
return fn(q, ...)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- vim.wo.foldmethod = 'expr'
|
||||
-- im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
end
|
||||
-- Automatically add closing tags for HTML and JSX
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
config = true,
|
||||
},
|
||||
}
|
||||
|
|
28
home/.config/nvim/lua/plugins/ufo.lua
Normal file
28
home/.config/nvim/lua/plugins/ufo.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- Better folds
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
--- @type UfoConfig
|
||||
opts = {
|
||||
close_fold_kinds_for_ft = {
|
||||
default = { "imports" },
|
||||
},
|
||||
},
|
||||
--- @param opts UfoConfig
|
||||
config = function(_, opts)
|
||||
local ufo = require("ufo")
|
||||
ufo.setup(opts)
|
||||
|
||||
-- Using ufo, we need to remap `zR` and `zM`
|
||||
vim.keymap.set("n", "zR", ufo.openAllFolds)
|
||||
vim.keymap.set("n", "zM", ufo.closeAllFolds)
|
||||
|
||||
-- Fold settings
|
||||
local o = vim.o
|
||||
o.foldcolumn = "1"
|
||||
o.foldlevel = 99
|
||||
o.foldlevelstart = 99
|
||||
o.foldenable = true
|
||||
end,
|
||||
}
|
34
home/.config/nvim/lua/plugins/which-key.lua
Normal file
34
home/.config/nvim/lua/plugins/which-key.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
-- Display possible keybinds
|
||||
-- Here I have also defined some generic keybinds
|
||||
-- Plugin specific keybinds are set up in plugin configuration file
|
||||
|
||||
local function toggle_theme()
|
||||
local current_theme = vim.fn.eval("&background")
|
||||
if current_theme == "dark" then
|
||||
vim.cmd("set background=light")
|
||||
else
|
||||
vim.cmd("set background=dark")
|
||||
end
|
||||
end
|
||||
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
wk.setup()
|
||||
|
||||
wk.register({
|
||||
h = { "<cmd>nohlsearch<cr>", "Turn off search highlight" },
|
||||
b = { toggle_theme, "Toggle background between dark and light" },
|
||||
}, { prefix = "<leader>" })
|
||||
|
||||
wk.register({
|
||||
["<Tab>"] = { "<cmd>bnext<cr>", "Next buffer" },
|
||||
["<S-Tab>"] = { "<cmd>bprevious<cr>", "Previous buffer" },
|
||||
})
|
||||
|
||||
-- Exit terminal insert mode with esc
|
||||
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", {})
|
||||
end,
|
||||
}
|
|
@ -1,20 +1,16 @@
|
|||
local o = vim.o
|
||||
local g = vim.g
|
||||
o.pumblend = 10
|
||||
|
||||
-- Relative line numbers
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
|
||||
-- True colors
|
||||
o.termguicolors = true
|
||||
|
||||
-- Font for nvim GUI's
|
||||
o.guifont = "Fira Code:h14"
|
||||
|
||||
-- Hide mouse when typing in neovide
|
||||
g.neovide_hide_mouse_when_typing = true
|
||||
|
||||
-- Enable cursor particles in neovide
|
||||
g.neovide_cursor_vfx_mode = "railgun"
|
||||
-- Enable cursorline highlighting
|
||||
o.cursorline = true
|
||||
|
||||
-- Floating window transparency
|
||||
o.winblend = 10
|
||||
|
@ -29,19 +25,14 @@ o.diffopt = "filler,internal,algorithm:histogram,indent-heuristic"
|
|||
-- Allow switching buffers with unsaved changes
|
||||
o.hidden = true
|
||||
|
||||
-- Show line numbers
|
||||
o.number = true
|
||||
|
||||
o.guicursor = table.concat({
|
||||
"i:ver1", -- Vertical bar cursor in insert mode
|
||||
"a:blinkon1", -- Blinking cursor in all modes
|
||||
"i:ver1", -- Vertical bar cursor in insert mode
|
||||
"a:blinkon1", -- Blinking cursor in all modes
|
||||
}, ",")
|
||||
|
||||
-- Enable global statusline
|
||||
o.laststatus = 3
|
||||
|
||||
o.cmdheight = 1
|
||||
|
||||
-- Use suda by default
|
||||
g.suda_smart_edit = 1
|
||||
|
||||
|
@ -54,14 +45,7 @@ g.mapleader = " "
|
|||
|
||||
-- Indentation settings
|
||||
o.tabstop = 4
|
||||
o.softtabstop = -1
|
||||
o.expandtab = true
|
||||
o.shiftwidth = 4
|
||||
o.smartindent = true
|
||||
|
||||
-- Firenvim settings
|
||||
vim.g.firenvim_config = {
|
||||
localSettings = {
|
||||
[".*"] = {
|
||||
takeOver = "never",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
20
home/.config/nvim/mason-lock.json
Normal file
20
home/.config/nvim/mason-lock.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"bash-language-server": "5.3.3",
|
||||
"css-lsp": "4.10.0",
|
||||
"docker-compose-language-service": "0.2.0",
|
||||
"dockerfile-language-server": "0.11.0",
|
||||
"eslint-lsp": "4.10.0",
|
||||
"google-java-format": "v1.22.0",
|
||||
"html-lsp": "4.10.0",
|
||||
"java-debug-adapter": "0.55.0",
|
||||
"jdtls": "v1.35.0",
|
||||
"json-lsp": "4.10.0",
|
||||
"lemminx": "0.26.1",
|
||||
"lua-language-server": "3.9.1",
|
||||
"prettier": "3.2.5",
|
||||
"prettierd": "0.25.3",
|
||||
"stylua": "v0.20.0",
|
||||
"taplo": "0.8.1",
|
||||
"typescript-language-server": "4.3.3",
|
||||
"yaml-language-server": "1.14.0"
|
||||
}
|
14
home/.config/nvim/snippets/java.json
Normal file
14
home/.config/nvim/snippets/java.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"queryListFromModel": {
|
||||
"scope": "java",
|
||||
"description": "Create a method to get a List from the database (Rossum JpaBaseDAO)",
|
||||
"prefix": "queryListFromModel",
|
||||
"body": [
|
||||
"public List<$1> $2() {",
|
||||
" return queryFromModelObject()",
|
||||
" .where((cb, root) -> $0)",
|
||||
" .results();",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
14
home/.config/nvim/snippets/package.json
Normal file
14
home/.config/nvim/snippets/package.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "functionalhacker-snippets",
|
||||
"engines": {
|
||||
"vscode": "^1.11.0"
|
||||
},
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "java",
|
||||
"path": "./java.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
11
home/.config/systemd/user/nvim-headless.service
Normal file
11
home/.config/systemd/user/nvim-headless.service
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Neovim headless server
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/bin/bash --login -c 'nvim --headless --listen %h/.var/nvim.socket'
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
13
home/.config/systemd/user/nvim-remote-ssh@.service
Normal file
13
home/.config/systemd/user/nvim-remote-ssh@.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=Neovim remote SSH socket
|
||||
|
||||
# Pass arguments https://superuser.com/a/1282178
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="SCRIPT_ARGS=%I"
|
||||
ExecStart=%h/.local/bin/nvim-remote-ssh $SCRIPT_ARGS
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
12
home/.config/zellij/config.kdl
Normal file
12
home/.config/zellij/config.kdl
Normal file
|
@ -0,0 +1,12 @@
|
|||
session_serialization false
|
||||
theme "kanagawa"
|
||||
|
||||
keybinds {
|
||||
unbind "Ctrl g"
|
||||
locked {
|
||||
bind "Ctrl l" { SwitchToMode "Normal"; }
|
||||
}
|
||||
shared_except "locked" {
|
||||
bind "Ctrl l" { SwitchToMode "Locked"; }
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue