Compare commits
No commits in common. "debian/bookworm" and "master" have entirely different histories.
debian/boo
...
master
95 changed files with 3706 additions and 488 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -2,7 +2,6 @@
|
|||
**/debian/*-config
|
||||
**/debian/*.debhelper
|
||||
**/debian/debhelper-*
|
||||
**/files/etc/wireguard
|
||||
**/secrets
|
||||
*.build
|
||||
*.buildinfo
|
||||
|
@ -13,5 +12,7 @@
|
|||
*.postinst.debhelper
|
||||
*.substvars
|
||||
*.tar.xz
|
||||
/build
|
||||
/debian/files
|
||||
config/shione/wireguard/files/etc/wireguard
|
||||
deploy/shione/nextcloud
|
||||
deploy/shione/srb2kart/dkartconfig.cfg
|
||||
deploy/shione/srb2kart/dkartconfig_password.cfg
|
||||
|
|
4
.guix-authorizations
Normal file
4
.guix-authorizations
Normal file
|
@ -0,0 +1,4 @@
|
|||
(authorization
|
||||
(version 0)
|
||||
(("5333 4B09 D206 6FCF 3A4A 27BF 1F2B B159 B645 E575"
|
||||
(name "renken"))))
|
3
.guix-channel
Normal file
3
.guix-channel
Normal file
|
@ -0,0 +1,3 @@
|
|||
(channel
|
||||
(version 0)
|
||||
(url "https://gitlab.com/renken/nichijou.git"))
|
133
.key
Normal file
133
.key
Normal file
|
@ -0,0 +1,133 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBGHn2aQBEADpEZ9lTLPIRMTPWS+qNjULvvlcZTa+PoGSFr+bG/KV7ehmRdiP
|
||||
Ra40s4Tb333U5Y8oHMS7O8X7F5CqkLk8bEwO4zT9YPQr3mqjXDWtu8uFpNY1+r8T
|
||||
XsoxA/LZ0I/nlRCpESo++g8C7qTDeWycugD8vtzMS+/CbtLvqlxX2r13is0GjuMk
|
||||
ibVxjydcJosSJOcu3ce3sdVMpB4UfQf44n6lmME6WCTYd0+S1lYkQsW1ouvik3ud
|
||||
8/QQ7VbGgaXq7IG3GYD0cOCtC9eem73SPXdE+ecei94v+JwxbfStohpUekIc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XhISNrjJU6ZUVvX0oceloEt5XydrFon5FI3iGNi/AQQxXdRV0OQuVc
|
||||
G30yRsJEnMXmSpw=
|
||||
=oUoT
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
141
LICENSE
141
LICENSE
|
@ -1,5 +1,5 @@
|
|||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
|
@ -7,15 +7,17 @@
|
|||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
|
@ -24,34 +26,44 @@ them if you wish), that you receive source code or can get it if you
|
|||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
@ -60,7 +72,7 @@ modification follow.
|
|||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
@ -537,45 +549,35 @@ to collect a royalty for further conveying from those to whom you convey
|
|||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
|
@ -633,29 +635,40 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
|
45
README.md
45
README.md
|
@ -1,13 +1,30 @@
|
|||
# Shione.net
|
||||
# Nichijou
|
||||
|
||||
Experimental Debian packaging and configuration. This project is mainly for
|
||||
educational purposes. However, the aim is to package shione-specific
|
||||
configuration in a way that would allow deployment to be reproducible.
|
||||
educational purposes. However, the aim is to produce a per-host shared
|
||||
configuration that would suit my real world usage.
|
||||
|
||||
## Package-specific configuration
|
||||
## Host machines
|
||||
|
||||
Because shione runs GNU/Linux Debian, I wish to transform per-package config
|
||||
into `.deb` packages themselves. This project is basically an application of
|
||||
### Siga
|
||||
|
||||
[Desktop PC](https://shione.net/2023/06/18/siga-desktop.html) running GNU/Linux
|
||||
Debian stable.
|
||||
|
||||
### Tabi
|
||||
|
||||
Lenovo Thinkpad x260 laptop running GNU/Linux Debian stable.
|
||||
|
||||
### Shione
|
||||
|
||||
[NiPoGi CK10](https://shione.net/2023/12/23/self-hosting-shione.html) Mini PC
|
||||
server running GNU/Linux Debian stable.
|
||||
|
||||
## HOWTO
|
||||
|
||||
Because all of my machines run GNU/Linux Debian, I wish to transform
|
||||
per-package config into `.deb` packages themselves. This project is basically
|
||||
an application of
|
||||
[`config-package-dev`](https://debathena.mit.edu/config-package-dev/). This
|
||||
will allow me to integrate the modifications I introduce to the said packages
|
||||
within the Debian packaging system which comes with many benefits.
|
||||
|
@ -21,13 +38,13 @@ within the Debian packaging system which comes with many benefits.
|
|||
|
||||
## Project hierarchy
|
||||
|
||||
It is not yet clear to me how I'll do this. I'm thinking perhaps about having a
|
||||
single source package that produces multiple "binary" packages. Each one would
|
||||
be a package-specific configuration. Standalone packages not specific to shione
|
||||
will probably reside in their own git repository under the Debian section.
|
||||
It is not yet clear to me how I'll do this. I'm thinking perhaps
|
||||
`config/$host/$package` with the exception of `config/generic/$package` for
|
||||
host-generic packages such as `neovim` for `siga` and `tabi`.
|
||||
|
||||
## References
|
||||
### NOTES
|
||||
|
||||
* https://www.eyrie.org/~eagle/notes/debian/git.html
|
||||
* https://people.debian.org/~debalance/packaging-with-git.html
|
||||
* http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.html
|
||||
```console
|
||||
$ debuild
|
||||
$ debuild -T clean
|
||||
```
|
||||
|
|
9
TODO.md
9
TODO.md
|
@ -1,4 +1,9 @@
|
|||
# TODO
|
||||
|
||||
* Integrate `deb-systemd-invoke` to stop/start/restart services properly
|
||||
pre/post-package installation.
|
||||
## Configuration
|
||||
|
||||
## Packaging
|
||||
* Package a recent version of neovim for Debian.
|
||||
* Port neovim config to (pure) lua.
|
||||
* Figure out a way to quickly package neovim plugins instead of relying on a
|
||||
thirdparty plugin manager?
|
||||
|
|
20
build.sh
20
build.sh
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Modifies the file hierarchy prior to build the Debian package.
|
||||
|
||||
set -eux
|
||||
|
||||
hash gbp
|
||||
|
||||
./clean.sh
|
||||
|
||||
# Builds wireguard configuration files.
|
||||
#
|
||||
# This mainly copies secret files and `wg0.conf` definition.
|
||||
build_wireguard() {
|
||||
cp -r ./secrets/files/etc/wireguard ./files/etc
|
||||
}
|
||||
|
||||
build_wireguard
|
||||
|
||||
gbp buildpackage --git-export=WC
|
5
clean.sh
5
clean.sh
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
rm -rf debian/*-config debian/*.debhelper debian/*.substvars
|
5
config/generic/openssh-server/debian/changelog
Normal file
5
config/generic/openssh-server/debian/changelog
Normal file
|
@ -0,0 +1,5 @@
|
|||
openssh-server-config (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Renken <renken@shione.net> Sun, 24 Dec 2023 15:25:54 +0100
|
1
config/generic/openssh-server/debian/compat
Normal file
1
config/generic/openssh-server/debian/compat
Normal file
|
@ -0,0 +1 @@
|
|||
9
|
16
config/generic/openssh-server/debian/control
Normal file
16
config/generic/openssh-server/debian/control
Normal file
|
@ -0,0 +1,16 @@
|
|||
Source: openssh-server-config
|
||||
Section: tasks
|
||||
Priority: optional
|
||||
Maintainer: Renken <renken@shione.net>
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper (>= 13.11~), config-package-dev (>= 4.15~)
|
||||
Standards-Version: 4.1.0
|
||||
|
||||
Package: openssh-server-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, openssh-server
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Opinionated openssh-server configuration.
|
||||
Opinionated openssh-server configuration.
|
8
config/generic/openssh-server/debian/copyright
Normal file
8
config/generic/openssh-server/debian/copyright
Normal file
|
@ -0,0 +1,8 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://gitlab.com/renken/nichijou
|
||||
Upstream-Contact: Renken <renken@shione.net>
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright: 2023, Renken <renken@shione.net>
|
||||
License: GPL-3
|
|
@ -0,0 +1 @@
|
|||
files/* /
|
|
@ -0,0 +1,3 @@
|
|||
# To disable tunneled clear text passwords, change to no here!
|
||||
PasswordAuthentication no
|
||||
PermitEmptyPasswords no
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB/LZ2vJmJ2AyQglNQ/8JYTl0yWZASjGBVwVe+Z36oYY mail@renken.systems/siga
|
5
config/shione/nftables/debian/changelog
Normal file
5
config/shione/nftables/debian/changelog
Normal file
|
@ -0,0 +1,5 @@
|
|||
nftables-config (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Renken <renken@shione.net> Sun, 24 Dec 2023 19:32:00 +0100
|
16
config/shione/nftables/debian/control
Normal file
16
config/shione/nftables/debian/control
Normal file
|
@ -0,0 +1,16 @@
|
|||
Source: nftables-config
|
||||
Section: tasks
|
||||
Priority: optional
|
||||
Maintainer: Renken <renken@shione.net>
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper (>= 13.11~), config-package-dev (>= 4.15~)
|
||||
Standards-Version: 4.1.0
|
||||
|
||||
Package: nftables-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, nftables
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Shione nftables configuration.
|
||||
Shione nftables configuration.
|
8
config/shione/nftables/debian/copyright
Normal file
8
config/shione/nftables/debian/copyright
Normal file
|
@ -0,0 +1,8 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://gitlab.com/renken/nichijou
|
||||
Upstream-Contact: Renken <renken@shione.net>
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright: 2023, Renken <renken@shione.net>
|
||||
License: GPL-3
|
2
config/shione/nftables/debian/files
Normal file
2
config/shione/nftables/debian/files
Normal file
|
@ -0,0 +1,2 @@
|
|||
nftables-config_1.0_all.deb tasks optional
|
||||
nftables-config_1.0_amd64.buildinfo tasks optional
|
1
config/shione/nftables/debian/nftables-config.displace
Normal file
1
config/shione/nftables/debian/nftables-config.displace
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/nftables.conf
|
1
config/shione/nftables/debian/nftables-config.install
Normal file
1
config/shione/nftables/debian/nftables-config.install
Normal file
|
@ -0,0 +1 @@
|
|||
files/* /
|
4
config/shione/nftables/debian/rules
Executable file
4
config/shione/nftables/debian/rules
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with config-package
|
1
config/shione/nftables/debian/source/format
Normal file
1
config/shione/nftables/debian/source/format
Normal file
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
|
@ -43,7 +43,7 @@ table inet filter {
|
|||
|
||||
# Allow VPN to use DNS.
|
||||
tcp dport {
|
||||
$dns_port,
|
||||
$dns_port
|
||||
$syncthing_port,
|
||||
$syncthing_gui_port,
|
||||
} accept
|
5
config/shione/nginx/debian/changelog
Normal file
5
config/shione/nginx/debian/changelog
Normal file
|
@ -0,0 +1,5 @@
|
|||
nginx-config (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Renken <renken@shione.net> Sun, 24 Dec 2023 19:32:00 +0100
|
1
config/shione/nginx/debian/compat
Normal file
1
config/shione/nginx/debian/compat
Normal file
|
@ -0,0 +1 @@
|
|||
10
|
16
config/shione/nginx/debian/control
Normal file
16
config/shione/nginx/debian/control
Normal file
|
@ -0,0 +1,16 @@
|
|||
Source: nginx-config
|
||||
Section: tasks
|
||||
Priority: optional
|
||||
Maintainer: Renken <renken@shione.net>
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper (>= 13.11~), config-package-dev (>= 4.15~)
|
||||
Standards-Version: 4.1.0
|
||||
|
||||
Package: nginx-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, nginx, certbot, python3-certbot-nginx
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Shione nginx configuration.
|
||||
Shione nginx configuration.
|
8
config/shione/nginx/debian/copyright
Normal file
8
config/shione/nginx/debian/copyright
Normal file
|
@ -0,0 +1,8 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://gitlab.com/renken/nichijou
|
||||
Upstream-Contact: Renken <renken@shione.net>
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright: 2023, Renken <renken@shione.net>
|
||||
License: GPL-3
|
1
config/shione/nginx/debian/nginx-config.hide
Normal file
1
config/shione/nginx/debian/nginx-config.hide
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/nginx/sites-enables/defaut
|
1
config/shione/nginx/debian/nginx-config.install
Normal file
1
config/shione/nginx/debian/nginx-config.install
Normal file
|
@ -0,0 +1 @@
|
|||
files/* /
|
4
config/shione/nginx/debian/rules
Executable file
4
config/shione/nginx/debian/rules
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with config-package
|
1
config/shione/nginx/debian/source/format
Normal file
1
config/shione/nginx/debian/source/format
Normal file
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
|
@ -20,21 +20,14 @@
|
|||
#
|
||||
# `fancyindex` is from `nginx-extras`.
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
# SSL configuration
|
||||
#
|
||||
# Partially generated by https://ssl-config.mozilla.org/.
|
||||
listen 443 ssl default_server;
|
||||
listen [::]:443 ssl default_server;
|
||||
|
||||
#
|
||||
# Note: You should disable gzip for SSL traffic.
|
||||
# See: https://bugs.debian.org/773332
|
||||
|
@ -50,6 +43,7 @@ server {
|
|||
ssl_certificate /etc/letsencrypt/live/shione.net/fullchain.pem;
|
||||
# managed by Certbot.
|
||||
ssl_certificate_key /etc/letsencrypt/live/shione.net/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
|
||||
# OCSP stapling
|
||||
ssl_stapling on;
|
5
config/shione/wireguard/debian/changelog
Normal file
5
config/shione/wireguard/debian/changelog
Normal file
|
@ -0,0 +1,5 @@
|
|||
wireguard-config (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Renken <renken@shione.net> Sun, 24 Dec 2023 23:46:00 +0100
|
1
config/shione/wireguard/debian/compat
Normal file
1
config/shione/wireguard/debian/compat
Normal file
|
@ -0,0 +1 @@
|
|||
10
|
16
config/shione/wireguard/debian/control
Normal file
16
config/shione/wireguard/debian/control
Normal file
|
@ -0,0 +1,16 @@
|
|||
Source: wireguard-config
|
||||
Section: tasks
|
||||
Priority: optional
|
||||
Maintainer: Renken <renken@shione.net>
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper (>= 13.11~), config-package-dev (>= 4.15~)
|
||||
Standards-Version: 4.1.0
|
||||
|
||||
Package: wireguard-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, wireguard, wireguard-tools
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Shione wireguard configuration.
|
||||
Shione wireguard configuration.
|
8
config/shione/wireguard/debian/copyright
Normal file
8
config/shione/wireguard/debian/copyright
Normal file
|
@ -0,0 +1,8 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://gitlab.com/renken/nichijou
|
||||
Upstream-Contact: Renken <renken@shione.net>
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright: 2023, Renken <renken@shione.net>
|
||||
License: GPL-3
|
2
config/shione/wireguard/debian/files
Normal file
2
config/shione/wireguard/debian/files
Normal file
|
@ -0,0 +1,2 @@
|
|||
wireguard-config_1.0_all.deb tasks optional
|
||||
wireguard-config_1.0_amd64.buildinfo tasks optional
|
4
config/shione/wireguard/debian/rules
Executable file
4
config/shione/wireguard/debian/rules
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with config-package
|
1
config/shione/wireguard/debian/source/format
Normal file
1
config/shione/wireguard/debian/source/format
Normal file
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
1
config/shione/wireguard/debian/wireguard-config.install
Normal file
1
config/shione/wireguard/debian/wireguard-config.install
Normal file
|
@ -0,0 +1 @@
|
|||
files/* /
|
8
doc/wireguard.md → config/shione/wireguard/generate_keys.sh
Normal file → Executable file
8
doc/wireguard.md → config/shione/wireguard/generate_keys.sh
Normal file → Executable file
|
@ -1,15 +1,9 @@
|
|||
# Wireguard
|
||||
|
||||
## Initial setup
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
cd -- ../../secrets/files/etc/wireguard
|
||||
cd -- files/etc/wireguard
|
||||
(umask 077; wg genkey | tee shione.private.key | wg pubkey > shione.public.key)
|
||||
# TODO: chmod 0600 all files under files/etc/wireguard.
|
||||
# TODO: Update files/etc/wireguard/wg0.conf accordingly.
|
||||
cd -- -
|
||||
```
|
1
debian/cgit-config.install
vendored
1
debian/cgit-config.install
vendored
|
@ -1 +0,0 @@
|
|||
files/etc/cgitrc /etc
|
63
debian/cgit-config.postinst
vendored
63
debian/cgit-config.postinst
vendored
|
@ -1,63 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
|
||||
# Sane defaults:
|
||||
git_home="${GIT_HOME:-/var/git}"
|
||||
git_user="${GIT_USER:-git}"
|
||||
git_name="${GIT_NAME:-git}"
|
||||
git_group="${GIT_GROUP:-www-data}"
|
||||
|
||||
# create user to avoid running server as root
|
||||
# 1. create group if not existing
|
||||
if ! getent group | grep -q "^$git_group:" ; then
|
||||
printf 'Adding group %s..\n' "$git_group"
|
||||
addgroup --quiet --system "$git_group" 2>/dev/null
|
||||
printf '..done\n'
|
||||
fi
|
||||
|
||||
# 2. create homedir if not existing
|
||||
if [ -d "$git_home" ]; then
|
||||
# `/var` *must* exist.
|
||||
mkdir -- "$git_home"
|
||||
fi
|
||||
|
||||
# 3. create user if not existing
|
||||
if ! getent passwd "$git_user"; then
|
||||
printf 'Adding system user %s..\n' "$git_user"
|
||||
# XXX: Do I really want a shell here?
|
||||
adduser --quiet \
|
||||
--system \
|
||||
--ingroup "$git_group" \
|
||||
--home "$git_home" \
|
||||
--shell /bin/bash \
|
||||
--disabled-password \
|
||||
"$git_user"
|
||||
printf '..done\n'
|
||||
fi
|
||||
|
||||
# 4. adjust passwd entry
|
||||
usermod \
|
||||
-c "$git_name" \
|
||||
-d "$git_home" \
|
||||
-g "$git_group" \
|
||||
"$git_user"
|
||||
|
||||
# 5. adjust file and directory permissions
|
||||
if ! dpkg-statoverride --list "$git_home" >/dev/null
|
||||
then
|
||||
chown -R "$git_user":"$git_group" "$git_home"
|
||||
chmod u=rwx,g=rxs,o= "$git_home"
|
||||
fi
|
||||
|
||||
deb-systemd-helper enable fcgiwrap
|
||||
deb-systemd-invoke restart fcgiwrap
|
||||
deb-systemd-invoke restart nginx
|
||||
;;
|
||||
# TODO: Handle remove, not that I need it yet though.
|
||||
esac
|
9
debian/changelog
vendored
9
debian/changelog
vendored
|
@ -1,9 +0,0 @@
|
|||
shione-config (0.1.0) UNRELEASED; urgency=low
|
||||
|
||||
* Add current openssh-server configuration.
|
||||
* Add current nftables configuration.
|
||||
* Add current nginx configuration.
|
||||
* Add current wireguard configuration.
|
||||
* Initial release.
|
||||
|
||||
-- Mohammed Amar-Bensaber <renken@shione.net> Sun, 24 Aug 2024 16:06:00 +0200
|
52
debian/control
vendored
52
debian/control
vendored
|
@ -1,52 +0,0 @@
|
|||
Source: shione-config
|
||||
Section: tasks
|
||||
Priority: optional
|
||||
Maintainer: Mohammed Amar-Bensaber <renken@shione.net>
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper (>= 13.11~), config-package-dev (>= 4.15~)
|
||||
Standards-Version: 4.1.0
|
||||
|
||||
Package: openssh-server-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, openssh-server
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Opinionated openssh-server configuration.
|
||||
Opinionated openssh-server configuration.
|
||||
|
||||
Package: nftables-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, nftables
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Shione nftables configuration.
|
||||
Nftables configuration for shione.net.
|
||||
|
||||
Package: nginx-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, nginx, certbot, libnginx-mod-http-fancyindex
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Shione nginx configuration.
|
||||
Nginx configuration for shione.net.
|
||||
|
||||
Package: wireguard-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, wireguard, wireguard-tools
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Shione wireguard configuration.
|
||||
Wireguard configuration for shione.net
|
||||
|
||||
Package: cgit-config
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, nginx-config, cgit, fcgiwrap, python3-pygments, python3-docutils, python3-markdown
|
||||
Provides: ${diverted-files}
|
||||
Conflicts: ${diverted-files}
|
||||
Description: Shione cgit configuration.
|
||||
Cgit configuration for shione.net
|
8
debian/copyright
vendored
8
debian/copyright
vendored
|
@ -1,8 +0,0 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://git.shione.net/shione.git
|
||||
Upstream-Contact: Mohammed Amar-Bensaber <renken@shione.net>
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright: 2024, Mohammed Amar-Bensaber <renken@shione.net>
|
||||
License: AGPL-3
|
8
debian/gbp.conf
vendored
8
debian/gbp.conf
vendored
|
@ -1,8 +0,0 @@
|
|||
[DEFAULT]
|
||||
upstream-tag=v%(version)s
|
||||
upstream-branch=debian/bookworm
|
||||
debian-branch=debian/bookworm
|
||||
|
||||
[buildpackage]
|
||||
export-dir = ./build
|
||||
git-export = WC
|
1
debian/nftables-config.displace
vendored
1
debian/nftables-config.displace
vendored
|
@ -1 +0,0 @@
|
|||
/etc/nftables.conf.shione
|
1
debian/nftables-config.displace-extension
vendored
1
debian/nftables-config.displace-extension
vendored
|
@ -1 +0,0 @@
|
|||
.shione
|
1
debian/nftables-config.install
vendored
1
debian/nftables-config.install
vendored
|
@ -1 +0,0 @@
|
|||
files/etc/nftables.conf.shione /etc/
|
1
debian/nginx-config.hide
vendored
1
debian/nginx-config.hide
vendored
|
@ -1 +0,0 @@
|
|||
/etc/nginx/sites-enabled/default
|
1
debian/nginx-config.install
vendored
1
debian/nginx-config.install
vendored
|
@ -1 +0,0 @@
|
|||
files/etc/nginx /etc/
|
32
debian/nginx-config.postinst
vendored
32
debian/nginx-config.postinst
vendored
|
@ -1,32 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# TODO: Handle "$1".
|
||||
|
||||
set -eu
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
# `certbot` *must* be installed by this package.
|
||||
if [ "$(hostname)" = shione ]; then
|
||||
certbot \
|
||||
--agree-tos \
|
||||
--email renken+letsencrypt@shione.net \
|
||||
-d shione.net \
|
||||
-d www.shione.net \
|
||||
-d git.shione.net
|
||||
else
|
||||
out=/etc/letsencrypt/live/shione.net
|
||||
|
||||
mkdir -p -- "$out"
|
||||
openssl genrsa \
|
||||
>"$out"/privkey.pem
|
||||
openssl req \
|
||||
-new \
|
||||
-x509 \
|
||||
-key /etc/letsencrypt/live/shione.net/privkey.pem \
|
||||
-subj '/CN=shione.net/O=shione.net./C=FR' \
|
||||
>/etc/letsencrypt/live/shione.net/fullchain.pem
|
||||
fi
|
||||
|
||||
# Apply new nginx configuration.
|
||||
deb-systemd-invoke restart nginx
|
2
debian/openssh-server-config.install
vendored
2
debian/openssh-server-config.install
vendored
|
@ -1,2 +0,0 @@
|
|||
files/root /root/
|
||||
files/etc/ssh /etc/
|
2
debian/wireguard-config.install
vendored
2
debian/wireguard-config.install
vendored
|
@ -1,2 +0,0 @@
|
|||
files/etc/sysctl.d/local.conf /etc/sysctl.d
|
||||
files/etc/wireguard /etc/
|
11
debian/wireguard-config.postinst
vendored
11
debian/wireguard-config.postinst
vendored
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# TODO: Handle "$1".
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
# Start wireguard service with `wg0.conf`.
|
||||
deb-systemd-helper enable wg-quick@wg0
|
||||
deb-systemd-invoke restart wg-quick@wg0
|
9
deploy/shione/nginx/create_nginx_user.sh
Normal file
9
deploy/shione/nginx/create_nginx_user.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
adduser --system --no-create-home --verbose --debug nginx
|
||||
|
||||
apt install nginx certbot python3-certbot-nginx
|
||||
|
||||
certbot --nginx -d shione.net -d www.shione.net
|
12
deploy/shione/srb2kart/README.md
Normal file
12
deploy/shione/srb2kart/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
Quoting [this thread on srb2
|
||||
forum](https://mb.srb2.org/threads/dedicated.7063/).
|
||||
|
||||
> Although that's the way it's often been used in practice, it's not actually
|
||||
> the case: adedserv.cfg is the counterpart of autoexec.cfg; dconfig.cfg of
|
||||
> config.cfg. This has important implications for setting the masterserver: it
|
||||
> works in the latter, but by the time the former is executed, it's too late.
|
||||
|
||||
|
||||
In this case, I'll put everything in `dconfig.cfg` and see later on if there
|
||||
are things I can delay to `adedserv.cfg`. I think the mods need to be
|
||||
broadcasted to the master server? I could be wrong here.
|
20
deploy/shione/srb2kart/deploy.sh
Executable file
20
deploy/shione/srb2kart/deploy.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
./generate_dkartconfig.sh
|
||||
|
||||
rsync \
|
||||
-a \
|
||||
--progress \
|
||||
srb2kart.socket \
|
||||
srb2kart.service \
|
||||
srb2kart@shione:/home/srb2kart/.config/systemd/user
|
||||
|
||||
rsync \
|
||||
-a \
|
||||
--delete \
|
||||
--progress \
|
||||
dkartconfig.cfg \
|
||||
mods \
|
||||
srb2kart@shione:/home/srb2kart/.srb2kart
|
45
deploy/shione/srb2kart/dkartconfig.cfg
Normal file
45
deploy/shione/srb2kart/dkartconfig.cfg
Normal file
|
@ -0,0 +1,45 @@
|
|||
// SRB2Kart configuration file.
|
||||
execversion "10"
|
||||
flipcam4 "No"
|
||||
flipcam3 "No"
|
||||
flipcam2 "No"
|
||||
flipcam "No"
|
||||
homremoval "Yes"
|
||||
discordinvites "Everyone"
|
||||
pingmeasurement "Frames"
|
||||
showping "Always"
|
||||
maxdelaytimeout "10"
|
||||
maxdelay "20"
|
||||
cpusleep "1"
|
||||
skipmapcheck "Off"
|
||||
kicktime "10"
|
||||
jointimeout "210"
|
||||
nettimeout "210"
|
||||
blamecfail "Off"
|
||||
showjoinaddress "On"
|
||||
allowjoin "On"
|
||||
http_source "http://shione.net/srb2kart/assets"
|
||||
downloadspeed "32"
|
||||
noticedownload "Off"
|
||||
maxsend "51200"
|
||||
resynchattempts "2"
|
||||
maxplayers "16"
|
||||
kartvoices "Tasteful"
|
||||
kartdisplayspeed "Off"
|
||||
kartinvinsfx "SFX"
|
||||
kartcheck "Yes"
|
||||
kartminimap "4"
|
||||
server_contact "renken@shione.net"
|
||||
servername "shione"
|
||||
holepunchserver "relay.kartkrew.org"
|
||||
masterserver_nagattempts "5"
|
||||
masterserver_token ""
|
||||
masterserver_debug "Off"
|
||||
masterserver_timeout "5"
|
||||
masterserver_update_rate "15"
|
||||
masterserver "https://ms.kartkrew.org/ms/api"
|
||||
addfile mods/000-pre/p1
|
||||
addfile mods/001-chars/c1
|
||||
addfile mods/001-chars/c2
|
||||
addfile mods/002-tracks/t1
|
||||
addfile mods/003-post/po1
|
40
deploy/shione/srb2kart/dkartconfig_base.cfg
Normal file
40
deploy/shione/srb2kart/dkartconfig_base.cfg
Normal file
|
@ -0,0 +1,40 @@
|
|||
// SRB2Kart configuration file.
|
||||
execversion "10"
|
||||
flipcam4 "No"
|
||||
flipcam3 "No"
|
||||
flipcam2 "No"
|
||||
flipcam "No"
|
||||
homremoval "Yes"
|
||||
discordinvites "Everyone"
|
||||
pingmeasurement "Frames"
|
||||
showping "Always"
|
||||
maxdelaytimeout "10"
|
||||
maxdelay "20"
|
||||
cpusleep "1"
|
||||
skipmapcheck "Off"
|
||||
kicktime "10"
|
||||
jointimeout "210"
|
||||
nettimeout "210"
|
||||
blamecfail "Off"
|
||||
showjoinaddress "On"
|
||||
allowjoin "On"
|
||||
http_source "http://shione.net/srb2kart/assets"
|
||||
downloadspeed "32"
|
||||
noticedownload "Off"
|
||||
maxsend "51200"
|
||||
resynchattempts "2"
|
||||
maxplayers "16"
|
||||
kartvoices "Tasteful"
|
||||
kartdisplayspeed "Off"
|
||||
kartinvinsfx "SFX"
|
||||
kartcheck "Yes"
|
||||
kartminimap "4"
|
||||
server_contact "renken@shione.net"
|
||||
servername "shione"
|
||||
holepunchserver "relay.kartkrew.org"
|
||||
masterserver_nagattempts "5"
|
||||
masterserver_token ""
|
||||
masterserver_debug "Off"
|
||||
masterserver_timeout "5"
|
||||
masterserver_update_rate "15"
|
||||
masterserver "https://ms.kartkrew.org/ms/api"
|
60
deploy/shione/srb2kart/generate_dkartconfig.sh
Executable file
60
deploy/shione/srb2kart/generate_dkartconfig.sh
Executable file
|
@ -0,0 +1,60 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
# Generates the portion of `dconfig.cfg` loading all necessary mod files in the
|
||||
# correct order.
|
||||
|
||||
# The script assumes a hierarchy demonstrated by the following example.
|
||||
# mods/
|
||||
# 000-pre/
|
||||
# 001-chars/
|
||||
# 002-tracks/
|
||||
# 003-post/
|
||||
|
||||
# This allows separation of mods based on category such as characters and
|
||||
# soundtracks but also serves as a poor man's dependency resolution between
|
||||
# groups of mods e.g., gameplay mods depending on specific characters. The same
|
||||
# approach can be used to solve dependency between mods found in the same
|
||||
# category, prefixing the mods with a sequence of digits *should* solve the
|
||||
# dependency problem e.g., `000-init-mod`, `001-mod-depending-on-000` and
|
||||
# `002-mod-depending-on-001`.
|
||||
|
||||
# While it shouldn't be hard to support a depth of more than 1 subdirectory, it
|
||||
# seems impractical to me.
|
||||
|
||||
if [ -e dkartconfig.cfg ]; then
|
||||
rm -- dkartconfig.cfg
|
||||
fi
|
||||
|
||||
if [ -e dkartconfig_generated.cfg ]; then
|
||||
rm -- dkartconfig_generated.cfg
|
||||
fi
|
||||
|
||||
cp -- dkartconfig_base.cfg dkartconfig.cfg
|
||||
|
||||
# NOTE: `dkartconfig_password.cfg` *must* follow the format `password xxx`.
|
||||
# TODO: Read from an environment variable?
|
||||
cat -- dkartconfig_password.cfg >>dkartconfig.cfg
|
||||
|
||||
# NOTE: `find` does not offer a way to guarantee a desired sort of its output.
|
||||
find mods -type f -printf 'addfile %p\n' | sort >dkartconfig_generated.cfg
|
||||
|
||||
cat -- dkartconfig_generated.cfg >>dkartconfig.cfg
|
||||
rm -- dkartconfig_generated.cfg
|
||||
|
||||
if [ -e mods/index ]; then
|
||||
rm -rf -- mods/index
|
||||
fi
|
||||
|
||||
printf 'regenerating index...\n'
|
||||
mkdir -- mods/index
|
||||
cd -- mods/index
|
||||
|
||||
# NOTE: Mods from different categories having the same name are not supported.
|
||||
# XXX: Please don't use newlines in filenames for the love of god.
|
||||
find .. -type f -print | while read -r file; do
|
||||
ln -s "$file" .
|
||||
done
|
||||
|
||||
cd -- -
|
23
deploy/shione/srb2kart/setup.sh
Normal file
23
deploy/shione/srb2kart/setup.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
# Install both build and runtime dependencies.
|
||||
#
|
||||
# Build dependencies are install just in case srb2kart needs to be compiled on
|
||||
# shione.
|
||||
apt install \
|
||||
make \
|
||||
git \
|
||||
nasm \
|
||||
gcc \
|
||||
libsdl2-mixer-dev \
|
||||
libpng-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libgme-dev \
|
||||
libopenmpt-dev \
|
||||
byobu
|
||||
|
||||
# The user `srb2kart` is used by default here.
|
||||
su srb2kart
|
||||
cd --
|
20
deploy/shione/srb2kart/srb2kart.service
Normal file
20
deploy/shione/srb2kart/srb2kart.service
Normal file
|
@ -0,0 +1,20 @@
|
|||
[Unit]
|
||||
Description=SRB2Kart Server
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
PermissionsStartOnly=false
|
||||
Sockets=srb2kart.socket
|
||||
StandardInput=socket
|
||||
StandardError=journal
|
||||
Environment=LC_ALL=C
|
||||
ExecStart=/home/srb2kart/.local/bin/srb2kart -dedicated
|
||||
Type=simple
|
||||
RemainAfterExit=false
|
||||
Restart=always
|
||||
RestartSec=1s
|
||||
TimeoutSec=180
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
3
deploy/shione/srb2kart/srb2kart.socket
Normal file
3
deploy/shione/srb2kart/srb2kart.socket
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Socket]
|
||||
ListenFIFO=%t/srb2kart.stdin
|
||||
Service=srb2kart.service
|
112
files/etc/cgitrc
112
files/etc/cgitrc
|
@ -1,112 +0,0 @@
|
|||
#
|
||||
# cgit config
|
||||
# see cgitrc(5) for details
|
||||
|
||||
# Specify the css url
|
||||
css=/cgit.css
|
||||
|
||||
# Specify the logo url
|
||||
logo=/cgit.png
|
||||
|
||||
# Add a cgit favicon
|
||||
favicon=/favicon.ico
|
||||
|
||||
## Set the title and heading of the repository index page
|
||||
root-title=shione.net git repositories
|
||||
|
||||
## Set a subheading for the repository index page
|
||||
root-desc=renken's unfinished projects
|
||||
|
||||
## Specify some default clone urls using macro expansion
|
||||
# clone-url=https://git.shione.net/$CGIT_REPO_URL ssh://git@example.com/$CGIT_REPO_URL.git
|
||||
clone-url=https://git.shione.net/$CGIT_REPO_URL
|
||||
|
||||
# root for all cgit links
|
||||
virtual-root=/
|
||||
|
||||
## Enable caching of up to 1000 output entries
|
||||
cache-size=1000
|
||||
|
||||
## Show owner on index page
|
||||
enable-index-owner=1
|
||||
|
||||
## Allow http transport git clone
|
||||
enable-http-clone=1
|
||||
|
||||
## Show extra links for each repository on the index page
|
||||
enable-index-links=1
|
||||
|
||||
## Enable blame page and create links to it from tree page
|
||||
enable-blame=1
|
||||
|
||||
## Enable ASCII art commit history graph on the log pages
|
||||
enable-commit-graph=1
|
||||
|
||||
## Show number of added/removed lines per commit on the log pages
|
||||
enable-log-linecount=1
|
||||
|
||||
## Sort branches by date
|
||||
branch-sort=age
|
||||
|
||||
## Enable statistics per week, month and quarter
|
||||
max-stats=quarter
|
||||
|
||||
## Include some more info about example.com on the index page
|
||||
## root-readme=/var/www/htdocs/about.html
|
||||
|
||||
## Allow download of tar.gz, tar.bz2 and zip-files
|
||||
snapshots=tar.gz zip
|
||||
|
||||
###
|
||||
### List of common mimetypes
|
||||
###
|
||||
|
||||
mimetype.gif=image/gif
|
||||
mimetype.html=text/html
|
||||
mimetype.jpg=image/jpeg
|
||||
mimetype.jpeg=image/jpeg
|
||||
mimetype.pdf=application/pdf
|
||||
mimetype.png=image/png
|
||||
mimetype.svg=image/svg+xml
|
||||
|
||||
# Format markdown, restructuredtext, manpages, text files, and html files
|
||||
# through the right converters
|
||||
about-filter=/usr/lib/cgit/filters/about-formatting.sh
|
||||
|
||||
# Highlight source code with python pygments-based highlighter
|
||||
source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
|
||||
|
||||
###
|
||||
### Search for these files in the root of the default branch of repositories
|
||||
### for coming up with the about page:
|
||||
###
|
||||
readme=:README.md
|
||||
readme=:readme.md readme=:README.mkd
|
||||
readme=:readme.mkd
|
||||
readme=:README.rst
|
||||
readme=:readme.rst
|
||||
readme=:README.html
|
||||
readme=:readme.html
|
||||
readme=:README.htm
|
||||
readme=:readme.htm
|
||||
readme=:README.txt
|
||||
readme=:readme.txt
|
||||
readme=:README
|
||||
readme=:readme
|
||||
readme=:INSTALL.md
|
||||
readme=:install.md
|
||||
readme=:INSTALL.mkd
|
||||
readme=:install.mkd
|
||||
readme=:INSTALL.rst
|
||||
readme=:install.rst
|
||||
readme=:INSTALL.html
|
||||
readme=:install.html
|
||||
readme=:INSTALL.htm
|
||||
readme=:install.htm
|
||||
readme=:INSTALL.txt
|
||||
readme=:install.txt
|
||||
readme=:INSTALL
|
||||
readme=:install
|
||||
|
||||
# Root directory
|
||||
scan-path=/var/git/
|
|
@ -1,20 +0,0 @@
|
|||
# Authentication
|
||||
LoginGraceTime 2m
|
||||
PermitRootLogin prohibit-password
|
||||
StrictModes yes
|
||||
MaxAuthTries 6
|
||||
MaxSessions 10
|
||||
|
||||
# To disable tunneled clear text passwords, change to no here!
|
||||
PasswordAuthentication no
|
||||
PermitEmptyPasswords no
|
||||
|
||||
# Kerberos options
|
||||
KerberosAuthentication no
|
||||
|
||||
# GSSAPI options
|
||||
GSSAPIAuthentication no
|
||||
|
||||
# TODO: Confirm that this is not overridden by the global configuration file?
|
||||
# X11 is not installed on this machine anyway.
|
||||
X11Forwarding no
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsk2gYw+DwDx08WK4MZNb5kLbIpmtgCoU41b8f60CrM renken@shione.net
|
14
images/forgejo/Dockerfile
Normal file
14
images/forgejo/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
# TODO: Add proper metadata.
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
COPY app.ini /etc/forgejo/app.ini
|
||||
COPY secrets/internal_token /etc/forgejo/internal_token
|
||||
COPY secrets/lfs_jwt_secret /etc/forgejo/lfs_jwt_secret
|
||||
COPY secrets/oauth2_jwt_secret /etc/forgejo/oauth2_jwt_secret
|
||||
COPY secrets/secret_key /etc/forgejo/secret_key
|
||||
COPY setup.sh /tmp/setup.sh
|
||||
RUN ./tmp/setup.sh
|
||||
USER git
|
||||
EXPOSE 3000
|
||||
CMD ["/usr/local/bin/forgejo", "-w", "/var/lib/forgejo", "-c", "/etc/forgejo/app.ini"]
|
50
images/forgejo/README.md
Normal file
50
images/forgejo/README.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Forgejo container image
|
||||
|
||||
It's very basic, possibly insecure but I will improve that later on. The key
|
||||
points to remember is that all secrets *must* be provided in the form of files
|
||||
to avoid any leakage.
|
||||
|
||||
## Create the admin user
|
||||
|
||||
Unfortunately there is no way to pre-seed forgejo's DB with an admin user to
|
||||
avoid any post-installation procedures. The following allows you to create it.
|
||||
|
||||
```console
|
||||
$ podman exec \
|
||||
"$container_id" \
|
||||
/usr/local/bin/forgejo \
|
||||
-w /var/lib/forgejo \
|
||||
-c /etc/forgejo/app.ini \
|
||||
admin user create \
|
||||
--admin \
|
||||
--username "$username" \
|
||||
--password "$basic_password" \
|
||||
--email "$email"
|
||||
```
|
||||
|
||||
**NOTE:**: You *should* do this before exposing your container to the internet
|
||||
just to be safe. Make sure to change the password once the account has been
|
||||
created.
|
||||
|
||||
## TODO
|
||||
|
||||
* Switch to PostgreSQL once I have an image emulating shione's setup running.
|
||||
* Test forgejo's OAuth2 thouroughly since it will be used to authenticate other
|
||||
services running on shione.
|
||||
* Switch to redis for caching once an image of it is available.
|
||||
* Host-container SSH forwarding.
|
||||
* systemd service.
|
||||
* Debian packaging which also creates a `git` UNIX user and stuff?
|
||||
* Maybe just use ansible?
|
||||
* Figure out what to backup.
|
||||
* Everything will be backed up using borgbase on the host side, possibly
|
||||
backup git repositories, databases and anything oauth2-related?
|
||||
* Setup mail.
|
||||
* Is `PASSWORD_HASH_ALGO = pbkdf2_hi` the best we could use?
|
||||
* Disable as many unneeded services integrated by default as possible? Is it
|
||||
possible to strip the binary from such services e.g., ACME-related code?
|
||||
* What to do with CI/CD? It would be nice to deploy shione services using
|
||||
forgejo.
|
||||
* Packaging forgejo using Guix or Debian? Is this too much?
|
||||
* Separate the base image from the image responsible only for copying
|
||||
host-specific secret artifacts to the final image.
|
1348
images/forgejo/app.ini
Normal file
1348
images/forgejo/app.ini
Normal file
File diff suppressed because it is too large
Load diff
49
images/forgejo/setup.sh
Executable file
49
images/forgejo/setup.sh
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
# Secure forgejo files before anything.
|
||||
adduser \
|
||||
--system \
|
||||
--shell /bin/bash \
|
||||
--gecos 'Git Version Control' \
|
||||
--group \
|
||||
--disabled-password \
|
||||
--home /home/git git
|
||||
|
||||
mkdir -p /var/lib/forgejo
|
||||
chown git:git /var/lib/forgejo
|
||||
chmod 750 /var/lib/forgejo
|
||||
|
||||
mkdir -p /etc/forgejo
|
||||
chown -R root:git /etc/forgejo
|
||||
|
||||
for file in app.ini lfs_jwt_secret secret_key internal_token oauth2_jwt_secret; do
|
||||
chmod 0640 /etc/forgejo/"$file"
|
||||
done
|
||||
|
||||
apt-get update -y
|
||||
|
||||
apt-get upgrade -y
|
||||
|
||||
apt-get --no-install-recommends install -y \
|
||||
ca-certificates \
|
||||
dirmngr \
|
||||
gpg \
|
||||
gpg-agent \
|
||||
curl \
|
||||
git \
|
||||
git-lfs \
|
||||
systemd
|
||||
|
||||
version=7.0.3
|
||||
curl -LO \
|
||||
"https://codeberg.org/forgejo/forgejo/releases/download/v$version/forgejo-$version-linux-amd64"
|
||||
gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
|
||||
curl -LO \
|
||||
"https://codeberg.org/forgejo/forgejo/releases/download/v$version/forgejo-$version-linux-amd64.asc"
|
||||
gpg --verify forgejo-$version-linux-amd64.asc forgejo-$version-linux-amd64
|
||||
|
||||
|
||||
chmod +x "forgejo-$version-linux-amd64"
|
||||
mv "forgejo-$version-linux-amd64" /usr/local/bin/forgejo
|
37
init.sh
37
init.sh
|
@ -1,37 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
apt update
|
||||
apt install -y apt-utils
|
||||
|
||||
mkdir -p -- /var/shione/debian/pool/main
|
||||
cp -- /tmp/shione/build/*.deb /var/shione/debian/pool/main
|
||||
|
||||
# XXX: Stolen from `local-apt-repository` which did not work for me for some reason.
|
||||
debs_dir_path=/var/shione/debian
|
||||
deb_repo_path=/var/lib/local-apt-repository
|
||||
mkdir -p -- "$deb_repo_path"
|
||||
|
||||
# Relative paths work better than absolute
|
||||
cd -- "$deb_repo_path"
|
||||
apt-ftparchive packages ../../../"$debs_dir_path" >"$deb_repo_path"/Packages
|
||||
apt-ftparchive sources ../../../"$debs_dir_path" >"$deb_repo_path"/Sources
|
||||
|
||||
apt-ftparchive \
|
||||
-o "APT::FTPArchive::Release::Origin=local-apt-repository-shione" \
|
||||
-o "APT::FTPArchive::Release::Description=Local repository created by a minimal version of local-apt-repository" \
|
||||
release "$deb_repo_path" > "$deb_repo_path"/Release
|
||||
|
||||
<<-EOF cat -- >/etc/apt/sources.list.d/local-apt-repository.list
|
||||
# This enables the local repositories provided by local-apt-repository
|
||||
#
|
||||
# We do not use cryptographic signatures, as they are read from local system
|
||||
# anyways.
|
||||
deb [trusted=yes] file:///var/lib/local-apt-repository/ ./
|
||||
deb-src [trusted=yes] file:///var/lib/local-apt-repository/ ./
|
||||
EOF
|
||||
|
||||
apt update
|
||||
|
||||
apt install -y nftables-config
|
4
nichijou/home/config/guix/channels
Normal file
4
nichijou/home/config/guix/channels
Normal file
|
@ -0,0 +1,4 @@
|
|||
(cons (channel (name 'nichijou)
|
||||
(url "file:///home/renken/dev/gitlab/nichijou"))
|
||||
;; (url "https://gitlab.com/renken/nichijou"))
|
||||
%default-channels)
|
28
nichijou/home/config/mpd/mpd.conf
Normal file
28
nichijou/home/config/mpd/mpd.conf
Normal file
|
@ -0,0 +1,28 @@
|
|||
music_directory "~/mu"
|
||||
playlist_directory "~/.config/mpd/playlists"
|
||||
db_file "~/.config/mpd/mpd.db"
|
||||
log_file "~/.config/mpd/mpd.log"
|
||||
pid_file "~/.config/mpd/mpd.pid"
|
||||
state_file "~/.config/mpd/mpdstate"
|
||||
sticker_file "~/.config/mpd/sticker.sql"
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "pulseaudio"
|
||||
#mixer_type "software"
|
||||
#mixer_control "PCM"
|
||||
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "HTTP Stream"
|
||||
encoder "vorbis" # optional, vorbis or lame
|
||||
port "8001"
|
||||
quality "5.0" # do not define if bitrate is defined
|
||||
# bitrate "320" # do not define if quality is defined
|
||||
# format "44100:16:1"
|
||||
}
|
||||
|
||||
filesystem_charset "UTF-8"
|
||||
bind_to_address "0.0.0.0"
|
120
nichijou/home/config/mpv/mpv.conf
Normal file
120
nichijou/home/config/mpv/mpv.conf
Normal file
|
@ -0,0 +1,120 @@
|
|||
# audio
|
||||
#ao=... (in case you use e.g. jack)
|
||||
audio-channels=auto
|
||||
audio-display=no
|
||||
volume-max=150.0
|
||||
alang=ja,jp,jpn,en,eng
|
||||
|
||||
# generic video/gpu
|
||||
vo=gpu
|
||||
gpu-api=opengl
|
||||
opengl-pbo
|
||||
#opengl-glfinish=yes
|
||||
#opengl-swapinterval=0
|
||||
#fbo-format=rgba16f
|
||||
dither-depth=auto
|
||||
hwdec=auto
|
||||
#linear-scaling=yes
|
||||
sigmoid-upscaling=yes
|
||||
correct-downscaling=yes
|
||||
#video-sync=display-resample
|
||||
#scale=spline36
|
||||
#cscale=mitchell
|
||||
#dscale=mitchell
|
||||
scale=spline36
|
||||
dscale=mitchell
|
||||
cscale=mitchell
|
||||
|
||||
# deband (enabled for shitty video sources below)
|
||||
deband=yes
|
||||
#deband-iterations=4
|
||||
#deband-threshold=48
|
||||
#deband-range=16
|
||||
#deband-grain=0
|
||||
|
||||
# static grain
|
||||
#glsl-shader=~~/shaders/noise_static_luma.hook
|
||||
#glsl-shader=~~/shaders/noise_static_chroma.hook
|
||||
|
||||
# luma upscale
|
||||
#scale=ewa_lanczos
|
||||
#glsl-shader=~~/shaders/FSRCNNX_x2_8-0-4-1.glsl
|
||||
|
||||
# luma downscale
|
||||
#dscale=gaussian
|
||||
#glsl-shader=~~/shaders/SSimDownscaler.glsl
|
||||
|
||||
# chroma scale
|
||||
#cscale=ewa_lanczossoft
|
||||
#glsl-shader=~~/shaders/KrigBilateral.glsl
|
||||
|
||||
# interpolation
|
||||
#interpolation
|
||||
#tscale=box
|
||||
#tscale-window=sphinx
|
||||
#tscale-radius=1.01
|
||||
#tscale-clamp=0.0
|
||||
|
||||
# subtitles
|
||||
blend-subtitles=yes
|
||||
demuxer-mkv-subtitle-preroll=yes
|
||||
sub-ass-vsfilter-blur-compat=no
|
||||
sub-fix-timing=no
|
||||
sub-auto=fuzzy
|
||||
slang=enm,en,eng
|
||||
|
||||
# user interface
|
||||
save-position-on-quit
|
||||
force-window=yes
|
||||
image-display-duration=3
|
||||
keep-open=yes
|
||||
no-hidpi-window-scale
|
||||
pause
|
||||
script-opts=osc-timems=yes
|
||||
window-scale=1.0
|
||||
|
||||
# screenshot
|
||||
screenshot-directory=~/p/ss/
|
||||
screenshot-template="%f_snapshot_%wH.%wM.%wS_[%ty.%tm.%td_%tH.%tM.%tS]"
|
||||
screenshot-format=png
|
||||
#screenshot-high-bit-depth=yes
|
||||
screenshot-png-compression=3
|
||||
screenshot-png-filter=0
|
||||
screenshot-tag-colorspace=yes
|
||||
|
||||
# don't bork on slow-responding disks
|
||||
cache=yes
|
||||
cache-secs=10
|
||||
|
||||
# stolen from https://pastebin.com/dxWhweXZ
|
||||
[WebDL1]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "%[1080p%]%[AAC%]%[JapDub%]%[GerSub%]%[Web%-DL%]")~=nil
|
||||
deband=yes
|
||||
|
||||
[WebDL2]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "%[1080p%]%[E%-AC3%]%[JapDub%]%[GerSub%]%[Web%-DL%]")~=nil
|
||||
deband=yes
|
||||
|
||||
[WebDL3]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "%[1080p%]%[AAC%]%[JapDub%]%[EngSub%]%[Web%-DL%]")~=nil
|
||||
deband=yes
|
||||
|
||||
[WebDL4]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "%[1080p%]%[E%-AC3%]%[JapDub%]%[EngSub%]%[Web%-DL%]")~=nil
|
||||
deband=yes
|
||||
|
||||
[HorribleSubs]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "HorribleSubs")~=nil
|
||||
deband=yes
|
||||
|
||||
[EraiRaws]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "Erai%-raws")~=nil
|
||||
deband=yes
|
||||
|
||||
[Legacy1]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "1080p.WebRip")~=nil
|
||||
deband=yes
|
||||
|
||||
[Legacy2]
|
||||
profile-desc=cond:string.match((p.filename and p.filename or "NULL"), "1080p.Web%-DL")~=nil
|
||||
deband=yes
|
173
nichijou/home/config/nvim/init.lua
Normal file
173
nichijou/home/config/nvim/init.lua
Normal file
|
@ -0,0 +1,173 @@
|
|||
function map(mode, shortcut, command)
|
||||
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
|
||||
end
|
||||
|
||||
function nmap(shortcut, command)
|
||||
map('n', shortcut, command)
|
||||
end
|
||||
|
||||
function imap(shortcut, command)
|
||||
map('i', shortcut, command)
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-- General
|
||||
---------------------------------------------------
|
||||
|
||||
-- Set the amount of lines of history to remember.
|
||||
vim.opt.history = 100
|
||||
|
||||
-- Set a mapleader key. This is used for extra key combinations.
|
||||
vim.g.mapleader = "\\"
|
||||
nmap("<Space>", "<leader>")
|
||||
|
||||
-- Better command line completion.
|
||||
vim.opt.wildmenu = true
|
||||
vim.opt.wildmode = "list:longest,full"
|
||||
|
||||
-- Ignore compiled and binary files.
|
||||
vim.opt.wildignore = "*.o,*~,*.pyc,*.png,*.pdf"
|
||||
|
||||
-- Filetypes
|
||||
vim.api.nvim_create_autocmd(
|
||||
{
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},
|
||||
{
|
||||
pattern = "*.irst",
|
||||
callback = function()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_buf_vim.opt_option(buf, "filetype", "rst")
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
{
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},
|
||||
{
|
||||
pattern = "*.puml",
|
||||
callback = function()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_buf_vim.opt_option(buf, "filetype", "plantuml")
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
{
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},
|
||||
{
|
||||
pattern = "*.tikz",
|
||||
callback = function()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_buf_vim.opt_option(buf, "filetype", "tex")
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
{
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},
|
||||
{
|
||||
pattern = "*.tpp",
|
||||
callback = function()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_buf_vim.opt_option(buf, "filetype", "cpp")
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
-- TODO: Restore last known cursor position, see https://github.com/neovim/neovim/issues/16339.
|
||||
|
||||
-- Set the swap directory to ~/.cache/nvim/swap.
|
||||
local cache = vim.env.XDG_CACHE_HOME or vim.fn.expand("~/.cache")
|
||||
local swap = cache .. "/nvim/swap"
|
||||
if vim.fn.isdirectory(swap) == 0 then
|
||||
vim.fn.mkdir(swap, 'p', 0700)
|
||||
end
|
||||
-- The extra '/' suffix is required to make vim create unique filenames.
|
||||
-- XXX: Not sure if this is required in neovim however.
|
||||
vim.opt.dir = { swap .. "//" }
|
||||
|
||||
-- Use system clipboard by default.
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
---------------------------------------------------
|
||||
-- User interface
|
||||
---------------------------------------------------
|
||||
|
||||
-- Display line numbers.
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Show the (partial) command in status line.
|
||||
vim.opt.showcmd = true
|
||||
|
||||
-- Always display the status line, even if only one window is displayed.
|
||||
vim.opt.laststatus = 2
|
||||
|
||||
-- Shows a dialogue asking if the file has to be saved, instead of raising an
|
||||
-- error.
|
||||
vim.opt.confirm = true
|
||||
|
||||
-- Keep the cursor in the centre of the buffer if possible.
|
||||
vim.opt.scrolloff = 10000
|
||||
|
||||
-- Disable automatic folding.
|
||||
-- vim.opt.nofoldenable = true
|
||||
|
||||
-- Delete the current buffer without closing the windows
|
||||
nmap("<leader>bd", ":Bdelete<CR>")
|
||||
-- Close window
|
||||
nmap("<leader>wd", ":q<CR>")
|
||||
-- Vertical split
|
||||
nmap("<leader>wv", ":vsplit<CR>")
|
||||
-- Horizontal split
|
||||
nmap("<leader>wh", ":split<CR>")
|
||||
-- Exit vim
|
||||
nmap("<leader>qq", ":qa<CR>")
|
||||
|
||||
-- Easy vertical terminal split opening (why is this not built-in?)
|
||||
-- cnoreabbrev vterm vert term
|
||||
|
||||
-- Set filetype.
|
||||
vim.opt.ffs = "unix"
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.colorcolumn = "80"
|
||||
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
|
||||
---------------------------------------------------
|
||||
-- Search
|
||||
--------------------------------------------------
|
||||
|
||||
vim.opt.ignorecase = true
|
||||
|
||||
vim.opt.smartcase = true
|
||||
|
||||
nmap("<C-L>", ":nohl<CR><C-L>")
|
||||
|
||||
vim.env.MANSECT = "3p:3:2:1:n:l:8:0:5:4:9:6:7"
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-- Text (tab, spaces, indent)
|
||||
---------------------------------------------------
|
||||
|
||||
vim.bo.softtabstop = 2
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.listchars = { tab = "»-", trail = "·" }
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
534
nichijou/home/config/nvim/init.vim
Normal file
534
nichijou/home/config/nvim/init.vim
Normal file
|
@ -0,0 +1,534 @@
|
|||
set runtimepath^=~/.guix-home/profile/share/vim/vimfiles/
|
||||
|
||||
"-------------------------------------------------
|
||||
" General
|
||||
"-------------------------------------------------
|
||||
|
||||
" Turn off vi compatibility.
|
||||
set nocompatible
|
||||
|
||||
" Set the amount of lines of history to remember.
|
||||
set history=100
|
||||
|
||||
" Set a mapleader key. This is used for extra key combinations.
|
||||
let mapleader = '\'
|
||||
map <Space> <leader>
|
||||
|
||||
" Better command line completion.
|
||||
set wildmenu
|
||||
set wildmode=list:longest,full
|
||||
|
||||
" Ignore compiled files.
|
||||
set wildignore=*.o,*~,*.pyc
|
||||
|
||||
" Ignore binary files.
|
||||
set wildignore^=*.png,*.pdf
|
||||
|
||||
" Filetypes
|
||||
autocmd BufRead,BufNewFile *.irst setfiletype rst
|
||||
autocmd BufRead,BufNewFile *.puml setfiletype plantuml
|
||||
autocmd BufRead,BufNewFile *.tikz setfiletype tex
|
||||
autocmd BufRead,BufNewFile *.tpp setlocal filetype=cpp
|
||||
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid, when inside an event handler
|
||||
" (happens when dropping a file on gvim) and for a commit message (it's
|
||||
" likely a different one than last time).
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
||||
\ | exe "normal! g`\""
|
||||
\ | endif
|
||||
|
||||
" Set the swap directory. The extra '/' suffix is required to make vim create
|
||||
" unique filenames.
|
||||
call mkdir(expand("~/.cache/nvim/swap"), "p", 0700)
|
||||
set dir=~/.cache/nvim/swap//
|
||||
|
||||
" Use system clipboard by default
|
||||
set clipboard +=unnamedplus
|
||||
|
||||
"-------------------------------------------------
|
||||
" User interface
|
||||
"-------------------------------------------------
|
||||
|
||||
" Display line numbers.
|
||||
set number
|
||||
|
||||
" Set the line numbers relative from the current line.
|
||||
set relativenumber
|
||||
|
||||
" Show the (partial) command in status line.
|
||||
set showcmd
|
||||
|
||||
" Always display the status line, even if only one window is displayed.
|
||||
set laststatus=2
|
||||
|
||||
" Shows a dialogue asking if the file has to be saved,
|
||||
" instead of raising an error.
|
||||
set confirm
|
||||
|
||||
" Keep the cursor in the centre of the buffer if possible.
|
||||
set scrolloff=10000
|
||||
|
||||
" Toggle NERDTree.
|
||||
map <C-t> :NERDTreeToggle<CR>
|
||||
|
||||
" Always show NERDTree on start if no files were specified.
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * if argc() ==# 0 && !exists("s:std_in")
|
||||
\ | exe 'NERDTreeToggle' | endif
|
||||
|
||||
" Disable automatic folding.
|
||||
set nofoldenable
|
||||
|
||||
" Add buffer switching with airline
|
||||
let g:airline#extensions#tabline#buffer_idx_mode = 1
|
||||
nmap <leader>1 <Plug>AirlineSelectTab1
|
||||
nmap <leader>2 <Plug>AirlineSelectTab2
|
||||
nmap <leader>3 <Plug>AirlineSelectTab3
|
||||
nmap <leader>4 <Plug>AirlineSelectTab4
|
||||
nmap <leader>5 <Plug>AirlineSelectTab5
|
||||
nmap <leader>6 <Plug>AirlineSelectTab6
|
||||
nmap <leader>7 <Plug>AirlineSelectTab7
|
||||
nmap <leader>8 <Plug>AirlineSelectTab8
|
||||
nmap <leader>9 <Plug>AirlineSelectTab9
|
||||
nmap <leader>bp <Plug>AirlineSelectPrevTab
|
||||
nmap <leader>bn <Plug>AirlineSelectNextTab
|
||||
nmap <S-Tab> <Plug>AirlineSelectPrevTab
|
||||
nmap <Tab> <Plug>AirlineSelectNextTab
|
||||
|
||||
" Delete the current buffer without closing the windows
|
||||
map <leader>bd :Bdelete<CR>
|
||||
" Close window
|
||||
map <leader>wd :q<CR>
|
||||
" Vertical split
|
||||
map <leader>ws :vsplit<CR>
|
||||
" Horizontal split
|
||||
map <leader>wh :split<CR>
|
||||
" Exit vim
|
||||
map <leader>qq :qa<CR>
|
||||
|
||||
" Invoke completion on : for ledger.
|
||||
autocmd FileType ledger imap <buffer> : :<C-x><C-o>
|
||||
|
||||
" Easy vertical terminal split opening (why is this not built-in?)
|
||||
cnoreabbrev vterm vert term
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Colours and fonts
|
||||
"-------------------------------------------------
|
||||
|
||||
" Enable Doxygen syntax highlighting.
|
||||
let g:load_doxygen_syntax=1
|
||||
|
||||
" Set the color scheme.
|
||||
" colorscheme wombat256mod
|
||||
|
||||
" Set the airline theme and configure the tabline
|
||||
" let g:airline_theme='wombat'
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#fnamecollapse = 1
|
||||
let g:airline#extensions#tabline#formatter = "default"
|
||||
|
||||
" Use 24-bit colours in the terminal, requires 'advanced' terminal emulator.
|
||||
set termguicolors
|
||||
|
||||
" Make the terminal background transparent.
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
|
||||
" Set encoding.
|
||||
set encoding=utf8
|
||||
|
||||
" Set filetype.
|
||||
set ffs=unix
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Search
|
||||
"-------------------------------------------------
|
||||
|
||||
" Highlights all matches of the search pattern.
|
||||
set hlsearch
|
||||
|
||||
" Show all the matches while typing the search command.
|
||||
set incsearch
|
||||
|
||||
" Ignores the case when searching.
|
||||
set ignorecase
|
||||
|
||||
" Case insensitive search, except when capital letters are used.
|
||||
set smartcase
|
||||
|
||||
" Redraw the screen when <C-L> is pressed.
|
||||
" This also turns off the search highlighting until the next search.
|
||||
nnoremap <C-L> :nohl<CR><C-L>
|
||||
|
||||
" Set the manual page section order for keywordprg
|
||||
let $MANSECT="3p:3:2:1:n:l:8:0:5:4:9:6:7"
|
||||
|
||||
"-------------------------------------------------
|
||||
" Text (tab, spaces, indent)
|
||||
"-------------------------------------------------
|
||||
|
||||
" Tabsize of 8 (default).
|
||||
set shiftwidth=8 tabstop=8
|
||||
|
||||
" Reset default behaviour to tabs instead of spaces for reStructuredText files.
|
||||
autocmd Filetype rst setlocal noexpandtab softtabstop=8
|
||||
|
||||
" 2 spaces instead of a tab for YAML files.
|
||||
autocmd Filetype yaml setlocal expandtab shiftwidth=2 softtabstop=2
|
||||
|
||||
" 4 spaces instead of a tab for Python and Haskell files.
|
||||
autocmd Filetype python,haskell,lhaskell,js setlocal expandtab shiftwidth=4
|
||||
\ softtabstop=4
|
||||
|
||||
" Copy indent from current line when starting a new line.
|
||||
set autoindent smartindent
|
||||
|
||||
" Highlight tabs and trailing spaces
|
||||
set list listchars=tab:>\ ,trail:·
|
||||
|
||||
" Removes trailing spaces when saving
|
||||
autocmd BufWrite * :call Delete_trailing_spaces()
|
||||
|
||||
" Disable softwrapping on long lines
|
||||
set nowrap
|
||||
|
||||
" Enable persistent undo if it is supported
|
||||
if has('persistent_undo')
|
||||
let vundodir = expand('~/.cache/nvim/undo')
|
||||
if !isdirectory(vundodir)
|
||||
call mkdir(vundodir)
|
||||
endif
|
||||
let &undodir = vundodir
|
||||
set undofile
|
||||
endif
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Deletion
|
||||
"-------------------------------------------------
|
||||
|
||||
" Delete without putting the deleted words into the register.
|
||||
map <leader>odw "_dw
|
||||
map <leader>odW "_dW
|
||||
map <leader>ode "_de
|
||||
map <leader>odE "_dE
|
||||
map <leader>odb "_db
|
||||
map <leader>odB "_dB
|
||||
map <leader>odd "_dd
|
||||
map <leader>od^ "_d^
|
||||
map <leader>od$ "_d$
|
||||
map <leader>od{ "_d{
|
||||
map <leader>od} "_d}
|
||||
map <leader>odi( "_di(
|
||||
map <leader>odi) "_di)
|
||||
map <leader>odi' "_di'
|
||||
map <leader>odi" "_di"
|
||||
map <leader>odi< "_di<
|
||||
map <leader>odi> "_di>
|
||||
map <leader>odf. "_df.
|
||||
map <leader>odf? "_df?
|
||||
map <leader>odf! "_df!
|
||||
map <leader>odt. "_dt.
|
||||
map <leader>odt? "_dt?
|
||||
map <leader>odt! "_dt!
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Code
|
||||
" Compiling
|
||||
"-------------------------------------------------
|
||||
|
||||
" Show warnings.
|
||||
set statusline=%#warningmsg#%{SyntasticStatuslineFlag()}%*
|
||||
|
||||
" Set syntastic options.
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_mode_map = {
|
||||
\ "mode": "active",
|
||||
\ "passive_filetypes": ["python"],
|
||||
\}
|
||||
let g:syntastic_check_on_open = 0
|
||||
let g:syntastic_check_on_wq = 0
|
||||
|
||||
let g:syntastic_check_on_wq = 0
|
||||
" Compiles the current file.
|
||||
map <leader>c :SyntasticCheck<cr>
|
||||
" Opens the location list that shows the errors.
|
||||
map <leader>co :lopen<cr><C-w><C-p>
|
||||
" Closes the location list that shows the errors.
|
||||
map <leader>cd :lclose<cr>
|
||||
|
||||
" Close any preview window that is open
|
||||
map <leader>cf :pclose<cr>
|
||||
|
||||
"" Completion framework.
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
" Disable abbreviation of signatures (also causes issues with echodoc)
|
||||
call deoplete#custom#source('_', 'max_abbr_width', 0)
|
||||
" Disable auto-completion on backspace character.
|
||||
call deoplete#custom#option('refresh_backspace', v:false)
|
||||
" Disable preview window containing function documentation.
|
||||
set completeopt-=preview
|
||||
" Map arrow keys to <C-p> and <C-n> for better selection behaviour.
|
||||
:inoremap <expr><Up> pumvisible() ? "\<C-p>" : "\<Up>"
|
||||
:inoremap <expr><Down> pumvisible() ? "\<C-n>" : "\<Down>"
|
||||
" Allow selection of completion with tab and shift+tab.
|
||||
:inoremap <expr><S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||
:inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||
|
||||
if executable('pyls')
|
||||
" pip install python-language-server
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'pyls',
|
||||
\ 'cmd': {server_info->['pyls']},
|
||||
\ 'allowlist': ['python'],
|
||||
\ })
|
||||
endif
|
||||
|
||||
if executable('clangd')
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'clangd',
|
||||
\ 'cmd': {server_info->['clangd', '-background-index']},
|
||||
\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'],
|
||||
\ })
|
||||
endif
|
||||
|
||||
if executable('gopls')
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'gopls',
|
||||
\ 'cmd': {server_info->['gopls', '-remote=auto']},
|
||||
\ 'allowlist': ['go'],
|
||||
\ })
|
||||
endif
|
||||
|
||||
function! s:on_lsp_buffer_enabled() abort
|
||||
" setlocal omnifunc=lsp#complete
|
||||
" Do not use virtual text, they are far too obtrusive.
|
||||
" let g:lsp_virtual_text_enabled = 0
|
||||
" echo a diagnostic message at cursor position
|
||||
" show diagnostic in floating window
|
||||
" let g:lsp_diagnostics_float_cursor = 1
|
||||
" whether to enable highlight a symbol and its references
|
||||
" let g:lsp_highlight_references_enabled = 1
|
||||
" let g:lsp_preview_max_width = 80
|
||||
setlocal signcolumn=yes
|
||||
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
||||
nmap <buffer> gd <plug>(lsp-definition)
|
||||
nmap <buffer> gs <plug>(lsp-document-symbol-search)
|
||||
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
|
||||
nmap <buffer> gr <plug>(lsp-references)
|
||||
nmap <buffer> gi <plug>(lsp-implementation)
|
||||
nmap <buffer> gt <plug>(lsp-type-definition)
|
||||
nmap <buffer> <leader>rn <plug>(lsp-rename)
|
||||
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
|
||||
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
|
||||
nmap <buffer> K <plug>(lsp-hover)
|
||||
inoremap <buffer> <expr><c-f> lsp#scroll(+4)
|
||||
inoremap <buffer> <expr><c-d> lsp#scroll(-4)
|
||||
|
||||
let g:lsp_format_sync_timeout = 1000
|
||||
let g:lsp_diagnostics_enabled = 1
|
||||
let g:lsp_diagnostics_echo_cursor = 1
|
||||
let g:lsp_diagnostics_float_cursor = 0
|
||||
let g:lsp_diagnostics_highlights_enabled = 1
|
||||
let g:lsp_diagnostics_virtual_text_enabled = 0
|
||||
" TODO: Call this when vim-lsp is enabled else call clang-format.
|
||||
"autocmd! BufWritePre *.c, *.cpp, *.h, *.hpp, *.rs, *.go call execute('LspDocumentFormatSync')
|
||||
" autocmd BufWritePre *.c, *.cpp, *.h, *.hpp, *.rs, *.go LspDocumentFormatSync
|
||||
|
||||
" refer to doc to add more commands
|
||||
endfunction
|
||||
|
||||
augroup lsp_install
|
||||
au!
|
||||
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
|
||||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||
augroup END
|
||||
|
||||
" Doxygen
|
||||
let g:DoxygenToolkit_briefTag_pre = ''
|
||||
let g:DoxygenToolkit_templateParamTag_pre = '\tparam '
|
||||
let g:DoxygenToolkit_templateParamTag_post = ' '
|
||||
let g:DoxygenToolkit_paramTag_pre = '\param '
|
||||
let g:DoxygenToolkit_paramTag_post = ' '
|
||||
let g:DoxygenToolkit_returnTag = '\return '
|
||||
let g:DoxygenToolkit_throwTag_pre = '\throw '
|
||||
let g:DoxygenToolkit_throwTag_post = ' '
|
||||
let g:DoxygenToolkit_fileTag = '\file '
|
||||
let g:DoxygenToolkit_authorTag = '\author '
|
||||
let g:DoxygenToolkit_dateTag = '\date '
|
||||
let g:DoxygenToolkit_versionTag = '\version '
|
||||
let g:DoxygenToolkit_blockTag = '\name '
|
||||
let g:DoxygenToolkit_classTag = '\class '
|
||||
" C is /** */, C++ is ///
|
||||
let g:DoxygenToolkit_commentType = 'C'
|
||||
" allow /** \brief Foo */ for e.g. enum doc.
|
||||
let g:DoxygenToolkit_compactOneLineDoc = 'yes'
|
||||
" No empty line between e.g. brief and param section.
|
||||
let g:DoxygenToolkit_compactDoc = 'yes'
|
||||
|
||||
" use <leader>ENTER to generate Doxygen block
|
||||
map <leader><cr> :Dox<cr>
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Code
|
||||
" Style
|
||||
"-------------------------------------------------
|
||||
|
||||
" Tip: format paragraph with 'gq' in normal mode.
|
||||
" Line wrap: default to 80 chars, except for python.
|
||||
" TODO if everyone agrees to move to pyls, remove this bit as it's hard-coded.
|
||||
set tw=80
|
||||
autocmd Filetype python setlocal tw=79
|
||||
" Line wrap: recognise list alignment.
|
||||
set fo+=n
|
||||
" Line wrap: remove comment leader when joining lines.
|
||||
set fo+=j
|
||||
|
||||
" Highlight the first 3 characters over 80 character limit.
|
||||
autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#501010
|
||||
autocmd BufEnter * match OverLength '\%<84v.\%>81v'
|
||||
|
||||
" Set colour for the vertical line that shows the character limit.
|
||||
highlight ColorColumn ctermbg=Grey guibg=#2d2d2d
|
||||
|
||||
" Toggle between the vertical line and the highlighting of characters.
|
||||
map <leader>cl :call Colorcolumn_highlighting()<cr>
|
||||
|
||||
" Toggle between the vertical line and the highlighting of characters.
|
||||
func! Colorcolumn_highlighting()
|
||||
if &l:colorcolumn ==# 81
|
||||
setlocal colorcolumn&
|
||||
match OverLength '\%<84v.\%>81v'
|
||||
else
|
||||
setlocal colorcolumn=81
|
||||
match OverLength /\%1000v.\+/
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Configure cursor line.
|
||||
set cursorline
|
||||
|
||||
" Disable checks for RST to avoid errors at unknown directives.
|
||||
let g:syntastic_rst_checkers = []
|
||||
|
||||
" Set table mode settings for RST.
|
||||
let g:table_mode_corner_corner='+'
|
||||
let g:table_mode_header_fillchar='='
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Code
|
||||
" Shortcuts
|
||||
"-------------------------------------------------
|
||||
|
||||
" Open the quickfix window containing lc diagnostics
|
||||
map <leader>lco :copen<cr><C-w><C-p>
|
||||
" Close the quickfix window containing lc diagnostics
|
||||
map <leader>lcd :cclose<cr>
|
||||
|
||||
"-------------------------------------------------
|
||||
" Code
|
||||
" Tags
|
||||
"-------------------------------------------------
|
||||
|
||||
map <leader>t :TagbarToggle<cr>
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Spell checking
|
||||
"-------------------------------------------------
|
||||
|
||||
" Set spell checking.
|
||||
set spell spelllang=en_us
|
||||
|
||||
" Disable spell check for some problematic filetypes.
|
||||
autocmd Filetype diff,gitrebase,plantuml,te,yaml setlocal nospell
|
||||
|
||||
" Toggle spell checking.
|
||||
map <leader>ss :setlocal spell!<cr>
|
||||
map <leader>sl :call Spellcheck_cycle_lang()<cr>
|
||||
|
||||
" Shortcuts for spell checking.
|
||||
map <leader>sn ]s " Next misspelled word.
|
||||
map <leader>sp [s " Previous mispelled word.
|
||||
map <leader>sa zg " Add word to dictionary.
|
||||
map <leader>s? z= " List alternative words.
|
||||
|
||||
|
||||
"-------------------------------------------------
|
||||
" Functions
|
||||
"-------------------------------------------------
|
||||
|
||||
" Finds and set the dir containing C/C++ compilation database
|
||||
func! Compilation_database_build_dir_set()
|
||||
let l:db_pre = expand('%:p:h')
|
||||
let l:db_post = ''
|
||||
while !filereadable(l:db_pre . l:db_post . '/compile_commands.json')
|
||||
" probe a potential build dir
|
||||
if filereadable(l:db_pre . l:db_post . '/build/compile_commands.json')
|
||||
let l:db_post = l:db_post . '/build'
|
||||
break
|
||||
endif
|
||||
" otherwise try a directory up
|
||||
let l:db_post = l:db_post . '/..'
|
||||
" Give up after after 10 dirs up (5 + 3 * 10).
|
||||
if strlen(l:db_post) > 35
|
||||
let l:db_pre = ''
|
||||
let l:db_post = ''
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Simplify the dir path, changing /dir/src/../build to /dir/build
|
||||
let l:db_dir = simplify(l:db_pre . l:db_post)
|
||||
|
||||
" Stop here if path hasn't changed to avoid language server restart.
|
||||
if exists('s:compdb_dir') &&
|
||||
\ s:compdb_dir ==# l:db_dir
|
||||
return 0
|
||||
endif
|
||||
let s:compdb_dir = l:db_dir
|
||||
|
||||
" Syntastic.
|
||||
" XXX Is this really needed? Remove and experiment.
|
||||
" TODO vim-lsp already provides their own database-searching function, find if
|
||||
" it can be used to replace this.
|
||||
let g:syntastic_c_clang_tidy_args = '-p=''' . s:compdb_dir . ''''
|
||||
let g:syntastic_cpp_clang_tidy_args = g:syntastic_c_clang_tidy_args
|
||||
endfunc
|
||||
|
||||
" Removes trailing spaces when saving
|
||||
" http://amix.dk/vim/vimrc.html
|
||||
func! Delete_trailing_spaces()
|
||||
" Do not execute for diff (patch) files, spaces are part of the context.
|
||||
if &filetype ==# 'diff'
|
||||
return 0
|
||||
endif
|
||||
exe "normal mz"
|
||||
%s/\s\+$//ge
|
||||
exe "normal `z"
|
||||
endfunc
|
||||
|
||||
" Cycle between spellcheck languages
|
||||
func! Spellcheck_cycle_lang()
|
||||
" If spellchecking is disabled, just enable it only
|
||||
if &spell ==# 0
|
||||
setlocal spell!
|
||||
echo 'enabled spell checking'
|
||||
return 0
|
||||
endif
|
||||
|
||||
if &spelllang ==# 'en_us'
|
||||
let l:lang = 'nl'
|
||||
else
|
||||
let l:lang = 'en_us'
|
||||
endif
|
||||
let &spelllang = l:lang
|
||||
echo 'changed spell checking language to ' . l:lang
|
||||
endfunc
|
8
nichijou/home/config/zsh/zlogout
Normal file
8
nichijou/home/config/zsh/zlogout
Normal file
|
@ -0,0 +1,8 @@
|
|||
# ~/.zshlogout: executed by zsh(1) when login shell exits.
|
||||
|
||||
# when leaving the console clear the screen to increase privacy
|
||||
if [ "$SHLVL" = 1 ]; then
|
||||
# XXX: Avoid hard-coding the path?
|
||||
# [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||
hash clear_console && clear_console -q
|
||||
fi
|
50
nichijou/home/config/zsh/zprofile
Normal file
50
nichijou/home/config/zsh/zprofile
Normal file
|
@ -0,0 +1,50 @@
|
|||
# set PATH so it includes user's private bin if it exists
|
||||
PATH="$PATH:/usr/sbin"
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
export LESS_TERMCAP_md=$'\e[01;31m'
|
||||
export LESS_TERMCAP_me=$'\e[0m'
|
||||
export LESS_TERMCAP_se=$'\e[0m'
|
||||
export LESS_TERMCAP_so=$'\e[01;44;33m'
|
||||
export LESS_TERMCAP_ue=$'\e[0m'
|
||||
export LESS_TERMCAP_us=$'\e[01;32m'
|
||||
|
||||
export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
export MANPAGER='nvim +Man!'
|
||||
export MANWIDTH=999
|
||||
export GOPATH=$HOME/go
|
||||
|
||||
# set PATH so it includes Golang's private bin if it exists
|
||||
if [ -d "$GOPATH/bin" ] ; then
|
||||
PATH="$GOPATH/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes Golang's private bin if it exists
|
||||
if [ -d "$HOME/.cargo/bin" ] ; then
|
||||
PATH="$HOME/cargo/bin:$PATH"
|
||||
fi
|
||||
|
||||
# Arrange so that ~/.config/guix/current comes first.
|
||||
for profile in "$HOME/.guix-profile" "$HOME/.config/guix/current"
|
||||
do
|
||||
if [ -f "$profile/etc/profile" ]
|
||||
then
|
||||
# Load the user profile's settings.
|
||||
GUIX_PROFILE="$profile" ; \
|
||||
. "$profile/etc/profile"
|
||||
else
|
||||
# At least define this one so that basic things just work
|
||||
# when the user installs their first package.
|
||||
export PATH="$profile/bin:$PATH"
|
||||
fi
|
||||
done
|
300
nichijou/home/config/zsh/zshrc
Normal file
300
nichijou/home/config/zsh/zshrc
Normal file
|
@ -0,0 +1,300 @@
|
|||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# Allow for substitutions inside prompt, necessary for e.g. git prompts.
|
||||
setopt PROMPT_SUBST
|
||||
|
||||
# Enable zsh's generic vcs info.
|
||||
autoload -Uz vcs_info
|
||||
precmd () { vcs_info }
|
||||
zstyle ':vcs_info:*' formats ' (%F{cyan}%b%f)'
|
||||
PS1='%B%F{green}%n@%m%f%b:%B%F{blue}%~%f$vcs_info_msg_0_%b%(!.#.$) '
|
||||
|
||||
setopt histignorealldups
|
||||
setopt sharehistory
|
||||
# Experimental options.
|
||||
setopt extended_history
|
||||
setopt hist_ignore_all_dups
|
||||
setopt hist_ignore_space
|
||||
setopt hist_reduce_blanks
|
||||
# Writing the directory name only will cd to it.
|
||||
setopt auto_cd
|
||||
# Do not move cursor to the end of line on completion.
|
||||
setopt complete_in_word
|
||||
# Allow comments in interactive shell.
|
||||
setopt interactive_comments
|
||||
# Disable beep.
|
||||
unsetopt beep
|
||||
# Do not autocorrect spelling for arguments.
|
||||
unsetopt correct
|
||||
unsetopt correct_all
|
||||
|
||||
# Remove duplicate paths.
|
||||
typeset -U PATH
|
||||
|
||||
# Keep 10000 lines of history within the shell and save it to ~/.zsh_history.
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTFILE=~/.zsh_history
|
||||
|
||||
# Use modern completion system.
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
# Also complete bash-specific completions.
|
||||
autoload -U bashcompinit
|
||||
bashcompinit
|
||||
|
||||
zstyle ':completion:*' auto-description 'specify: %d'
|
||||
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
||||
zstyle ':completion:*' format 'Completing %d'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' menu select=2
|
||||
eval "$(dircolors -b)"
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' list-colors ''
|
||||
zstyle ':completion:*' list-prompt \
|
||||
%SAt %p: Hit TAB for more, or the character to insert%s
|
||||
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' \
|
||||
'r:|[._-]=* r:|=* l:|=*'
|
||||
zstyle ':completion:*' menu select=long
|
||||
zstyle ':completion:*' select-prompt \
|
||||
%SScrolling active: current selection at %p%s
|
||||
zstyle ':completion:*' use-compctl false
|
||||
zstyle ':completion:*' verbose true
|
||||
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||
|
||||
# Source useful defaults.
|
||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
||||
source /usr/share/doc/fzf/examples/completion.zsh
|
||||
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
# Editor and input char assignment.
|
||||
[[ ${TERM} != 'dumb' ]] && () {
|
||||
|
||||
# Use human-friendly identifiers.
|
||||
zmodload -F zsh/terminfo +b:echoti +p:terminfo
|
||||
typeset -gA key_info
|
||||
key_info=(
|
||||
'Control' '\C-'
|
||||
'ControlLeft' '\e[1;5D \e[5D \e\e[D \eOd \eOD'
|
||||
'ControlRight' '\e[1;5C \e[5C \e\e[C \eOc \eOC'
|
||||
'Escape' '\e'
|
||||
'Meta' '\M-'
|
||||
'Backspace' "${terminfo[kbs]}"
|
||||
'BackTab' "${terminfo[kcbt]}"
|
||||
'Left' "${terminfo[kcub1]}"
|
||||
'Down' "${terminfo[kcud1]}"
|
||||
'Right' "${terminfo[kcuf1]}"
|
||||
'Up' "${terminfo[kcuu1]}"
|
||||
'Delete' "${terminfo[kdch1]}"
|
||||
'End' "${terminfo[kend]}"
|
||||
'F1' "${terminfo[kf1]}"
|
||||
'F2' "${terminfo[kf2]}"
|
||||
'F3' "${terminfo[kf3]}"
|
||||
'F4' "${terminfo[kf4]}"
|
||||
'F5' "${terminfo[kf5]}"
|
||||
'F6' "${terminfo[kf6]}"
|
||||
'F7' "${terminfo[kf7]}"
|
||||
'F8' "${terminfo[kf8]}"
|
||||
'F9' "${terminfo[kf9]}"
|
||||
'F10' "${terminfo[kf10]}"
|
||||
'F11' "${terminfo[kf11]}"
|
||||
'F12' "${terminfo[kf12]}"
|
||||
'Home' "${terminfo[khome]}"
|
||||
'Insert' "${terminfo[kich1]}"
|
||||
'PageDown' "${terminfo[knp]}"
|
||||
'PageUp' "${terminfo[kpp]}"
|
||||
)
|
||||
|
||||
# Bind the keys.
|
||||
local key
|
||||
for key (${(s: :)key_info[ControlLeft]}) bindkey ${key} backward-word
|
||||
for key (${(s: :)key_info[ControlRight]}) bindkey ${key} forward-word
|
||||
|
||||
if [[ -n ${key_info[Home]} ]]; then
|
||||
bindkey ${key_info[Home]} beginning-of-line
|
||||
fi
|
||||
if [[ -n ${key_info[End]} ]] bindkey ${key_info[End]} end-of-line
|
||||
|
||||
if [[ -n ${key_info[PageUp]} ]]; then
|
||||
bindkey ${key_info[PageUp]} up-line-or-history
|
||||
fi
|
||||
if [[ -n ${key_info[PageDown]} ]]; then
|
||||
bindkey ${key_info[PageDown]} down-line-or-history
|
||||
fi
|
||||
|
||||
if [[ -n ${key_info[Insert]} ]]; then
|
||||
bindkey ${key_info[Insert]} overwrite-mode
|
||||
fi
|
||||
|
||||
if [[ -n ${key_info[Backspace]} ]]; then
|
||||
bindkey ${key_info[Backspace]} backward-delete-char
|
||||
fi
|
||||
if [[ -n ${key_info[Delete]} ]] bindkey ${key_info[Delete]} delete-char
|
||||
|
||||
if [[ -n ${key_info[Left]} ]] bindkey ${key_info[Left]} backward-char
|
||||
if [[ -n ${key_info[Right]} ]] bindkey ${key_info[Right]} forward-char
|
||||
|
||||
if [[ -n ${key_info[Up]} ]] bindkey ${key_info[Up]} history-search-backward
|
||||
if [[ -n ${key_info[Down]} ]] bindkey ${key_info[Down]} history-search-forward
|
||||
|
||||
# Expandpace.
|
||||
bindkey ' ' magic-space
|
||||
|
||||
# Clear.
|
||||
bindkey "${key_info[Control]}L" clear-screen
|
||||
|
||||
# Bind <Shift-Tab> to go to the previous menu item.
|
||||
if [[ -n ${key_info[BackTab]} ]]; then
|
||||
bindkey ${key_info[BackTab]} reverse-menu-complete
|
||||
fi
|
||||
|
||||
# Use smart URL pasting and escaping.
|
||||
autoload -Uz bracketed-paste-url-magic \
|
||||
&& zle -N bracketed-paste bracketed-paste-url-magic
|
||||
autoload -Uz url-quote-magic && zle -N self-insert url-quote-magic
|
||||
|
||||
if zstyle -t ':zim:input' double-dot-expand; then
|
||||
double-dot-expand() {
|
||||
if [[ ${LBUFFER} == *.. ]]; then
|
||||
LBUFFER+='/..'
|
||||
else
|
||||
LBUFFER+='.'
|
||||
fi
|
||||
}
|
||||
zle -N double-dot-expand
|
||||
bindkey '.' double-dot-expand
|
||||
bindkey -M isearch '.' self-insert
|
||||
fi
|
||||
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.3; then
|
||||
# Redisplay after completing, and avoid blank prompt after
|
||||
# <Tab><Tab><Ctrl-C>
|
||||
expand-or-complete-with-redisplay() {
|
||||
print -Pn '...'
|
||||
zle expand-or-complete
|
||||
zle redisplay
|
||||
}
|
||||
zle -N expand-or-complete-with-redisplay
|
||||
bindkey "${key_info[Control]}I" \
|
||||
expand-or-complete-with-redisplay
|
||||
fi
|
||||
|
||||
# Put into application mode and validate ${terminfo}
|
||||
zle-line-init() {
|
||||
if (( ${+terminfo[smkx]} )) echoti smkx
|
||||
}
|
||||
zle-line-finish() {
|
||||
if (( ${+terminfo[rmkx]} )) echoti rmkx
|
||||
}
|
||||
zle -N zle-line-init
|
||||
zle -N zle-line-finish
|
||||
}
|
||||
|
||||
# Color support
|
||||
alias ls='ls --group-directories-first --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
|
||||
# Grep in a directory
|
||||
alias grepd='grep -rIin'
|
||||
|
||||
# List only directories and symbolic links that point to directories.
|
||||
alias lsd='ls -ld *(-/DN)'
|
||||
|
||||
# List all files.
|
||||
alias l='ls -lhA --time-style=long-iso'
|
||||
alias ll='ls -lh --time-style=long-iso'
|
||||
|
||||
# Colored GCC warnings and errors
|
||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;'\
|
||||
'32:locus=01:quote=01'
|
||||
|
||||
# Recursively finds all occurrence that satisfies the given expression
|
||||
f()
|
||||
{
|
||||
find . -iname "*${*}*"
|
||||
}
|
||||
|
||||
# Do not force window, useful for terminal use.
|
||||
# TODO: Can it be turned into a config file instead?
|
||||
alias mpv='mpv --force-window=no'
|
||||
|
||||
# Use clipboard selection instead of default primary.
|
||||
alias xclip='xclip -selection clipboard'
|
||||
|
||||
# Ask before overwriting. Add a character to prove you are sure of your actions.
|
||||
alias mvf=mv
|
||||
alias mv='mv -i'
|
||||
alias rmf=rm
|
||||
alias rm='rm -i'
|
||||
|
||||
# I'd rather use nvim for everything.
|
||||
alias vim=nvim
|
||||
alias vimdiff='nvim -d'
|
||||
|
||||
# Recursively rsync the given path.
|
||||
alias rsyncc='rsync --info=progress2 -avz'
|
||||
|
||||
# Download youtube playlist in a sorted manner
|
||||
# TODO: update
|
||||
alias youtube-dl-ordered='youtube-dl -i -o
|
||||
"%(playlist_index)s-%(title)s.%(ext)s"'
|
||||
|
||||
# Open the todo.txt file
|
||||
# This and track can be updated to use xdg documents path if others find them
|
||||
# useful as well.
|
||||
alias todo='$EDITOR ~/doc/txt/todo.txt'
|
||||
|
||||
# Load keyboard kernel object for colors and brightness control.
|
||||
# TODO: Use the deb instead or dkms.
|
||||
alias keyboard='cd ~/dev/github/tuxedo-keyboard/src; sudo insmod ./*.ko; cd'
|
||||
|
||||
# Switch to games-specific user fast.
|
||||
alias vidya='xhost +si:localuser:vidya && sudo -u vidya -i'
|
||||
|
||||
# Switch 4k monitor resolution to 720p before switching to vidya then switching
|
||||
# back to 4k after gaming is done.
|
||||
alias steam='xrandr --output DP-1 --mode 1280x720 --rate 60; vidya;
|
||||
xrandr --output DP-1 --mode 3840x2160 --rate 60'
|
||||
|
||||
# Prefer cantata-based radio to this
|
||||
# Plays an online stream using mpv and records it.
|
||||
# $1 Stream link.
|
||||
# $2 File path.
|
||||
radio()
|
||||
{
|
||||
curl -l "$1" | tee "$2" | mpv -
|
||||
}
|
||||
|
||||
# Silly tracking.
|
||||
track()
|
||||
{
|
||||
echo "$(date)> $1" >>~/doc/txt/log.txt
|
||||
}
|
||||
|
||||
# Records microphone locally.
|
||||
recordmic()
|
||||
{
|
||||
ffmpeg -f pulse -i alsa_input.pci-0000_00_1f.3.analog-stereo -f pulse \
|
||||
-i alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -map 0:0 \
|
||||
-map 1:0 "$HOME/tv/record/$1.ogg"
|
||||
}
|
||||
|
||||
# Records audio output.
|
||||
record()
|
||||
{
|
||||
ffmpeg -f pulse \
|
||||
-i alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -map 0:0 \
|
||||
"$HOME/tv/record/$1.ogg"
|
||||
}
|
||||
|
||||
# TODO: load dz keyboard layout properly using setxkbmap
|
||||
# Maybe should be somewhere else e.g., .profile? or somewhere system-wide
|
||||
|
||||
export PATH="$HOME/.poetry/bin:$PATH"
|
25
nichijou/home/host/siga.scm
Normal file
25
nichijou/home/host/siga.scm
Normal file
|
@ -0,0 +1,25 @@
|
|||
(define-module (nichijou home host siga)
|
||||
#:use-module (gnu home)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module ((nichijou home nvim)
|
||||
#:prefix nvim:)
|
||||
#:use-module ((nichijou home mpd)
|
||||
#:prefix mpd:)
|
||||
#:use-module ((nichijou home mpv)
|
||||
#:prefix mpv:)
|
||||
#:use-module ((nichijou home zsh)
|
||||
#:prefix zsh:))
|
||||
|
||||
;; TODO: Think of a better approach to do this.
|
||||
;; What if a module's get-packages function expects different parameters?
|
||||
;; Should modules (packages) be forced to implement the same get-packages
|
||||
;; signature? If so, how?
|
||||
(define (apply-get-packages m)
|
||||
(m:get-packages #:foreign-distro? #t))
|
||||
|
||||
(home-environment
|
||||
(packages (fold append
|
||||
(list)
|
||||
(map apply-get-packages
|
||||
(list mpd mpv nvim zsh))))
|
||||
(services (append mpd:services mpv:services nvim:services zsh:services)))
|
17
nichijou/home/mpd.scm
Normal file
17
nichijou/home/mpd.scm
Normal file
|
@ -0,0 +1,17 @@
|
|||
(define-module (nichijou home mpd)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages mpd)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 optargs))
|
||||
|
||||
(define*-public (get-packages #:key (foreign-distro? #f))
|
||||
(if foreign-distro?
|
||||
(list)
|
||||
(list mpd)))
|
||||
|
||||
;; TODO: Write MPD home service?
|
||||
(define-public services
|
||||
(list (simple-service 'nichijou-mpd-config home-files-service-type
|
||||
`((".config/mpd/mpd.conf" ,(local-file
|
||||
"config/mpd/mpd.conf"))))))
|
17
nichijou/home/mpv.scm
Normal file
17
nichijou/home/mpv.scm
Normal file
|
@ -0,0 +1,17 @@
|
|||
(define-module (nichijou home mpv)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 optargs))
|
||||
|
||||
(define*-public (get-packages #:key (foreign-distro? #f))
|
||||
(if foreign-distro?
|
||||
(list)
|
||||
(list mpv mpv-mpris)))
|
||||
|
||||
;; TODO: Implement mpv home service?
|
||||
(define-public services
|
||||
(list (simple-service 'nichijou-mpv-config home-files-service-type
|
||||
`((".config/mpv/mpv.conf" ,(local-file
|
||||
"config/mpv/mpv.conf"))))))
|
31
nichijou/home/nvim.scm
Normal file
31
nichijou/home/nvim.scm
Normal file
|
@ -0,0 +1,31 @@
|
|||
(define-module (nichijou home nvim)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages vim)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 optargs)
|
||||
#:use-module (nichijou packages vim))
|
||||
|
||||
(define plugins
|
||||
(list vim-airline
|
||||
vim-airline-themes
|
||||
vim-bbye
|
||||
vim-ctrlp
|
||||
vim-deoplete
|
||||
vim-deoplete-vim-lsp
|
||||
vim-detectindent
|
||||
vim-doxygen-toolkit
|
||||
vim-lsp
|
||||
vim-nerdtree
|
||||
vim-plantuml-syntax
|
||||
vim-syntastic
|
||||
vim-tagbar))
|
||||
|
||||
(define*-public (get-packages #:key (foreign-distro? #f))
|
||||
(if foreign-distro? plugins
|
||||
(const neovim plugins)))
|
||||
|
||||
(define-public services
|
||||
(list (simple-service 'nichijou-nvim-config home-files-service-type
|
||||
`((".config/nvim/init.vim" ,(local-file
|
||||
"config/nvim/init.vim"))))))
|
24
nichijou/home/zsh.scm
Normal file
24
nichijou/home/zsh.scm
Normal file
|
@ -0,0 +1,24 @@
|
|||
(define-module (nichijou home zsh)
|
||||
#:use-module (gnu home services shells)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu packages shellutils)
|
||||
#:use-module (gnu packages terminals)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 optargs))
|
||||
|
||||
(define packages
|
||||
(list zsh-syntax-highlighting zsh-autosuggestions fzf))
|
||||
|
||||
(define*-public (get-packages #:key (foreign-distro? #f))
|
||||
(if foreign-distro?
|
||||
(list) packages))
|
||||
|
||||
(define-public services
|
||||
(list (service home-zsh-service-type
|
||||
(home-zsh-configuration (xdg-flavor? #t)
|
||||
(zprofile (list (local-file
|
||||
"config/zsh/zprofile")))
|
||||
(zlogout (list (local-file
|
||||
"config/zsh/zlogout")))
|
||||
(zshrc (list (local-file
|
||||
"config/zsh/zshrc")))))))
|
250
nichijou/packages/vim.scm
Normal file
250
nichijou/packages/vim.scm
Normal file
|
@ -0,0 +1,250 @@
|
|||
(define-module (nichijou packages vim)
|
||||
#:use-module ((guix licenses)
|
||||
#:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system copy)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages vim)
|
||||
#:use-module (gnu packages uml))
|
||||
|
||||
(define-public vim-plantuml-syntax
|
||||
(package
|
||||
(name "vim-plantuml-syntax")
|
||||
(version "0.2.0")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/aklt/plantuml-syntax")
|
||||
(commit "660bbb1ece1e654b2176f76ce0689304c5a4a025")))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"05xf36np8y0gdcd05nzmkawh131lp4mm5cjgjr1byr8cjyl1idr3"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
'(#:install-plan '(("ftdetect" "share/vim/vimfiles/")
|
||||
("ftplugin" "share/vim/vimfiles/")
|
||||
("indent" "share/vim/vimfiles/")
|
||||
("syntax" "share/vim/vimfiles/"))))
|
||||
(synopsis "Vim PlantUML Syntax/Plugin/FTDetect")
|
||||
(inputs (list plantuml))
|
||||
(description
|
||||
"This is a vim syntax file for PlantUML.The filetype will be set to
|
||||
plantuml for @code{*.pu}, @code{*.uml}, @code{*.puml}, @code{*.iuml} or
|
||||
@code{*.plantuml} files or if the first line of a file contains
|
||||
@code{@@startuml}. Additionally the makeprg is set to plantuml assuming you
|
||||
have this executable in your path.")
|
||||
(home-page "https://github.com/aklt/plantuml-syntax")
|
||||
(license #f)))
|
||||
|
||||
(define-public vim-doxygen-toolkit
|
||||
(package
|
||||
(name "vim-doxygen-toolkit")
|
||||
(version "0.2.13")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/vim-scripts/DoxygenToolkit.vim")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1za8li02j4nhqjjsyxg4p78638h5af4izim37zc0p1x55zr3i85r"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
'(#:install-plan '(("plugin" "share/vim/vimfiles/"))))
|
||||
(synopsis "Simplify Doxygen documentation in C, C++, Python.")
|
||||
(description
|
||||
"Currently five purposes have been defined :
|
||||
@itemize
|
||||
@item Generates a doxygen license comment. The tag text is configurable.
|
||||
@item Generates a doxygen author skeleton. The tag text is configurable.
|
||||
@item Generates a doxygen comment skeleton for a C, C++ or Python function or
|
||||
class, including @code{@@brief}, @code{@@param} (for each named argument), and
|
||||
@code{@@return}. The tag text as well as a comment block header and footer are
|
||||
configurable. (Consequently, you can have brief, etc. if you wish, with little
|
||||
effort.)
|
||||
@item Ignore code fragment placed in a block defined by #ifdef ... #endif
|
||||
(C/C++). The block name must be given to the function. All of the
|
||||
corresponding blocks in all the file will be treated and placed in a new block
|
||||
DOX_SKIP_BLOCK (or any other name that you have configured). Then you have to
|
||||
update PREDEFINED value in your doxygen configuration file with correct block
|
||||
name. You also have to set ENABLE_PREPROCESSING to YES.
|
||||
@item Generate a doxygen group (beginning and ending). The tag text is
|
||||
configurable.
|
||||
@end itemize")
|
||||
(home-page "https://www.vim.org/scripts/script.php?script_id=987")
|
||||
(license #f)))
|
||||
|
||||
(define-public vim-detectindent
|
||||
;; No releases have been tagged.
|
||||
(let ((commit "2511f0f02fb046a09fdbdfc8f21c7a6f2d234936")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "vim-detectindent")
|
||||
(version (git-version "0.0.0" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/roryokane/detectindent")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"16k3h64z4ysphchnhgj3jyms51ps0lla885yqznfbknz49pg44cb"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
`(#:install-plan '(("doc" "share/vim/vimfiles/")
|
||||
("plugin" "share/vim/vimfiles/"))))
|
||||
(home-page "https://github.com/roryokane/detectindent")
|
||||
(synopsis "Vim script for automatically detecting indent settings")
|
||||
(description
|
||||
"This script provides a command which will attempt to guess the correct
|
||||
indent settings for an open file, for use when there is no modeline
|
||||
available. Specifically, the command sets the following buffer-local
|
||||
options for you:
|
||||
@itemize
|
||||
@item 'expandtab' (tabs vs. spaces)
|
||||
@item 'shiftwidth' (width of indentation)
|
||||
@item 'tabstop' (width of a tab character)
|
||||
@item 'softtabstop' (number of spaces that Tab inserts)
|
||||
@end itemize
|
||||
|
||||
Note that this is a pure Vim implementation, and doesn’t require any external
|
||||
applications or interpreters.")
|
||||
(license #f))))
|
||||
|
||||
(define-public vim-deoplete
|
||||
(let ((commit "33ed4fa0cd704999f9f74b37640bf6d7334bac37")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "vim-deoplete")
|
||||
(version (git-version "6.1" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/Shougo/deoplete.nvim")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1gabd83gy3skx3q3prk6drn3dzwag5jmzmp43492mihdak0iks3i"))))
|
||||
(build-system copy-build-system)
|
||||
(inputs (list python-pynvim))
|
||||
(arguments
|
||||
`(#:install-plan '(("autoload" "share/vim/vimfiles/")
|
||||
("doc" "share/vim/vimfiles/")
|
||||
("plugin" "share/vim/vimfiles/")
|
||||
("rplugin" "share/vim/vimfiles/"))))
|
||||
(home-page "https://github.com/Shougo/deoplete.nvim")
|
||||
(synopsis
|
||||
"Dark powered asynchronous completion framework for neovim/Vim8")
|
||||
(description
|
||||
"deoplete is the abbreviation of 'dark powered neo-completion'. It
|
||||
provides an asynchronous keyword completion system in the current
|
||||
buffer.")
|
||||
(license license:expat))))
|
||||
|
||||
(define-public vim-lsp
|
||||
(let ((commit "309e9e5c8103bee69eabd152c09eaeec2e0a11f9")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "vim-lsp")
|
||||
(version (git-version "0.1.4" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/prabirshrestha/vim-lsp")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"10hwqd07qipn146iwdih3l7f8nbzz01jh7wpbl9f8l84vi5g5c45"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
`(#:install-plan '(("autoload" "share/vim/vimfiles/")
|
||||
("doc" "share/vim/vimfiles/")
|
||||
("ftplugin" "share/vim/vimfiles/")
|
||||
("plugin" "share/vim/vimfiles/")
|
||||
("syntax" "share/vim/vimfiles/"))))
|
||||
(home-page "https://github.com/prabirshrestha/vim-lsp")
|
||||
(synopsis "Async language server protocol plugin for vim and neovim")
|
||||
(description "Async language server protocol plugin for vim and neovim")
|
||||
;; vim-lsp itself is licensed under expat however it borrows code from other
|
||||
;; third party projects that are not strictly expat. Setting license to #f for now.
|
||||
(license #f))))
|
||||
|
||||
(define-public vim-deoplete-vim-lsp
|
||||
(let ((commit "af5432f1e063fd4c3a5879aa8c2afe82c17dc1c9")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "vim-deoplete-vim-lsp")
|
||||
;; No releases have been tagged.
|
||||
(version (git-version "0.0.0" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url
|
||||
"https://github.com/lighttiger2505/deoplete-vim-lsp")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1s6fw6vkpl0yiya22g13v4i14w3n1ds2zr8zdlwpkk44bf0225px"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
`(#:install-plan '(("autoload" "share/vim/vimfiles/")
|
||||
("plugin" "share/vim/vimfiles/")
|
||||
("rplugin" "share/vim/vimfiles/"))))
|
||||
(home-page "https://github.com/lighttiger2505/deoplete-vim-lsp")
|
||||
(synopsis "deoplete source for vim-lsp")
|
||||
(description "deoplete source for vim-lsp")
|
||||
(license license:expat))))
|
||||
|
||||
(define-public vim-bbye
|
||||
(let ((commit "25ef93ac5a87526111f43e5110675032dbcacf56")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "vim-bbye")
|
||||
(version (git-version "1.0.1" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/moll/vim-bbye")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"0dlifpbd05fcgndpkgb31ww8p90pwdbizmgkkq00qkmvzm1ik4y4"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
`(#:install-plan '(("plugin" "share/vim/vimfiles/"))))
|
||||
(home-page "https://github.com/moll/vim-bbye")
|
||||
(synopsis
|
||||
"Delete buffers and close files in Vim without closing your windows or messing up your layout. Like Bclose.vim, but rewritten and well maintained.")
|
||||
|
||||
(description
|
||||
"Bbye allows you to do delete buffers (close files) without
|
||||
closing your windows or messing up your layout.
|
||||
|
||||
Vim by default closes all windows that have the buffer (file) open when you do
|
||||
:bdelete. If you've just got your splits and columns perfectly tuned, having
|
||||
them messed up equals a punch in the face and that's no way to tango.
|
||||
|
||||
Bbye gives you :Bdelete and :Bwipeout commands that behave like well designed
|
||||
citizens:
|
||||
@itemize
|
||||
@item Close and remove the buffer.
|
||||
@item Show another file in that window.
|
||||
@item Show an empty file if you've got no other files open.
|
||||
@item Do not leave useless [no file] buffers if you decide to edit another file in that window.
|
||||
@item Work even if a file's open in multiple windows.
|
||||
@item Work a-okay with various buffer explorers and tabbars.
|
||||
@end itemize
|
||||
Regain your throne as king of buffers!")
|
||||
;; Bbye is released under a Lesser GNU Affero General Public License.
|
||||
(license license:agpl3))))
|
20
srt-server
Executable file
20
srt-server
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
# This worked somehow.
|
||||
# srt-live-transmit 'srt://:60001?mode=listener&bandwidth=60000&timeout=10000' srt://:60000 -v
|
||||
|
||||
# 1mbps, see https://medium.com/@michael_70509/configuring-srt-properly-d89517354d0d
|
||||
bandwidth="${SRT_BANDWIDTH:-250000}"
|
||||
# 1 second in microseconds, see https://obsproject.com/wiki/Streaming-With-SRT-Or-RIST-Protocols.
|
||||
timeout="${SRT_TIMEOUT:-2000000}"
|
||||
latency="${SRT_LATENCY:-30}"
|
||||
# Extra arguments must start with '&'
|
||||
input_extra_args="${SRT_INPUT_EXTRA_ARGS:-}"
|
||||
output_passphrase="${SRT_PASSPHRASE:-}"
|
||||
|
||||
srt-live-transmit \
|
||||
"srt://:60001?mode=listener&bandwidth=$bandwidth&timeout=$timeout&latency=$latency$input_extra_args" \
|
||||
"srt://:60000$output_passphrase" \
|
||||
-v
|
Loading…
Reference in a new issue