Compare commits
317 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9acfc5f934 | ||
|
|
c20f1b0b59 | ||
|
|
8f833485da | ||
|
|
5b5ef2b9b0 | ||
|
|
15e2355406 | ||
|
|
29533d6be6 | ||
|
|
26f324e66d | ||
|
|
cea2980fef | ||
|
|
3f1dfd5fa9 | ||
|
|
2538d7c279 | ||
|
|
118f7a2fe8 | ||
|
|
00340a9c01 | ||
|
|
a8f29d26c6 | ||
|
|
8803e130cc | ||
|
|
732f4fbd00 | ||
|
|
2cb67804d4 | ||
|
|
e0480cb6f6 | ||
|
|
ec6ae25e9b | ||
|
|
46f2ec8b96 | ||
|
|
6abf5ce39b | ||
|
|
b78c83b575 | ||
|
|
3391febda2 | ||
|
|
66a543abf7 | ||
|
|
6b01f9d032 | ||
|
|
ddd3dbf267 | ||
|
|
56c1f35548 | ||
|
|
4473255269 | ||
|
|
8838f98658 | ||
|
|
47377f7a96 | ||
|
|
4a6cbd763f | ||
|
|
9252e9c546 | ||
|
|
31447d9a3f | ||
|
|
cea15be44d | ||
|
|
719d92c178 | ||
|
|
729defa8b1 | ||
|
|
c3b8102546 | ||
|
|
d187cdf35f | ||
|
|
0caef3e587 | ||
|
|
7ef0ebf5e7 | ||
|
|
a263b4177a | ||
|
|
c9e7e493d8 | ||
|
|
3b368ec8de | ||
|
|
638dc6cd95 | ||
|
|
783e381fbe | ||
|
|
40b42028d2 | ||
|
|
64e6a9c159 | ||
|
|
c8a49d4f47 | ||
|
|
ed9008112b | ||
|
|
ae98f0d5df | ||
|
|
35f108e3fc | ||
|
|
1519305952 | ||
|
|
b9f5c87aa0 | ||
|
|
4c06f00555 | ||
|
|
da56b4ea64 | ||
|
|
f5ff5d5066 | ||
|
|
8813fb5117 | ||
|
|
723ce403b2 | ||
|
|
d83ff89712 | ||
|
|
baf7580e99 | ||
|
|
41240db5c9 | ||
|
|
deaa3d5889 | ||
|
|
9ce9a7ec6a | ||
|
|
101f4d3183 | ||
|
|
fb37690bc0 | ||
|
|
e07b3c2b6e | ||
|
|
9da6bd15ab | ||
|
|
95fa226b9e | ||
|
|
524b45b876 | ||
|
|
18bfbeb7d4 | ||
|
|
47b8159ff1 | ||
|
|
acd87fca74 | ||
|
|
1c692101b9 | ||
|
|
1a55a41d4d | ||
|
|
870c55b889 | ||
|
|
116a099732 | ||
|
|
04f6b7eeb9 | ||
|
|
a34dd0dfd7 | ||
|
|
5c7ae68078 | ||
|
|
ca684173ac | ||
|
|
c61bb5ba11 | ||
|
|
310d7d7fbd | ||
|
|
4bc06d0f07 | ||
|
|
ca9e922e6e | ||
|
|
f02f26636e | ||
|
|
f0b7b7ad7f | ||
|
|
4e985811fc | ||
|
|
0287e9d582 | ||
|
|
dbe12c8d5e | ||
|
|
49c7cae7f9 | ||
|
|
cc824b648b | ||
|
|
b89e63e0f2 | ||
|
|
65b0c41069 | ||
|
|
bddc0bedc7 | ||
|
|
f4d9a0e5d3 | ||
|
|
8379703b93 | ||
|
|
edf45b7be5 | ||
|
|
057e8959a0 | ||
|
|
a896d5eb5d | ||
|
|
355cf03bd1 | ||
|
|
d0f432b717 | ||
|
|
0848f04326 | ||
|
|
f3d5371320 | ||
|
|
a7f24d1d67 | ||
|
|
9f93bf814a | ||
|
|
915bf256da | ||
|
|
6ea3851e72 | ||
|
|
5229a4c480 | ||
|
|
2a250deccf | ||
|
|
e6c7351094 | ||
|
|
ae2126f363 | ||
|
|
37686e3a1e | ||
|
|
5440fd2c8a | ||
|
|
91334e26a5 | ||
|
|
ca2d20522c | ||
|
|
3957e1a4a7 | ||
|
|
9577cdf243 | ||
|
|
044dbadbe1 | ||
|
|
4fad38afdb | ||
|
|
99586839c8 | ||
|
|
06ec1df09a | ||
|
|
a921818915 | ||
|
|
ba1bba39b4 | ||
|
|
d7f27943a5 | ||
|
|
708d65d696 | ||
|
|
1ac888d583 | ||
|
|
c5c09b0358 | ||
|
|
c3060b2be9 | ||
|
|
d136a3069e | ||
|
|
6fb45a0200 | ||
|
|
90efa8e67f | ||
|
|
234a5f2a99 | ||
|
|
486f8b7732 | ||
|
|
1468f3d0fc | ||
|
|
e7d3def830 | ||
|
|
57d5ea065a | ||
|
|
641a0cd84d | ||
|
|
51896dabea | ||
|
|
21c1067572 | ||
|
|
18a2a32bae | ||
|
|
78d028f2a5 | ||
|
|
e9da090c2a | ||
|
|
a8daed1d10 | ||
|
|
2830b98729 | ||
|
|
8f898bcb9b | ||
|
|
dfea676a01 | ||
|
|
4b439fd3e7 | ||
|
|
b490763245 | ||
|
|
de3d35a9b2 | ||
|
|
49b557befa | ||
|
|
34badc91d5 | ||
|
|
7d614f784c | ||
|
|
7d82c3cee9 | ||
|
|
6ca7717d3e | ||
|
|
178d51cde6 | ||
|
|
0115f4e806 | ||
|
|
bf73151817 | ||
|
|
f5f396db25 | ||
|
|
9279f3a8d3 | ||
|
|
157bd5d45a | ||
|
|
2aa5e0095c | ||
|
|
6cac368378 | ||
|
|
9075c97ce8 | ||
|
|
0045d0cb18 | ||
|
|
a21ff3228c | ||
|
|
91fc0227bf | ||
|
|
6b44dcb023 | ||
|
|
e39f07eac1 | ||
|
|
4cba57bdd8 | ||
|
|
b69ff8e50d | ||
|
|
266ad63ceb | ||
|
|
057c7e9194 | ||
|
|
c7132d2d85 | ||
|
|
ed15ef02bb | ||
|
|
22fe55c284 | ||
|
|
80d4a38a1c | ||
|
|
86e1e1984b | ||
|
|
3efa748383 | ||
|
|
2386303317 | ||
|
|
27968d69ba | ||
|
|
f414735247 | ||
|
|
85cbd5e1f6 | ||
|
|
609bb1597f | ||
|
|
e0d3dbdadc | ||
|
|
f431d24f81 | ||
|
|
6b33a182d8 | ||
|
|
a11c7854d1 | ||
|
|
7e11641fe7 | ||
|
|
9d10005e35 | ||
|
|
3e3721d44f | ||
|
|
6de42365be | ||
|
|
f87164088f | ||
|
|
616522bfa6 | ||
|
|
155f629159 | ||
|
|
69ef705820 | ||
|
|
b7f739d0b0 | ||
|
|
a4ad3b8088 | ||
|
|
d366887a77 | ||
|
|
87baf57aa3 | ||
|
|
2a216838ec | ||
|
|
b83c578d63 | ||
|
|
2fda153ede | ||
|
|
267c03f8e5 | ||
|
|
a2306d4a16 | ||
|
|
36d97926e6 | ||
|
|
e15ab08adf | ||
|
|
cf9349168f | ||
|
|
e8c405b3f1 | ||
|
|
27679d38fd | ||
|
|
e7e59715d8 | ||
|
|
9034735f84 | ||
|
|
bd95ef4c9b | ||
|
|
14de7e4f7e | ||
|
|
ecd37537cc | ||
|
|
289f072c13 | ||
|
|
de9b5cf40c | ||
|
|
da4cf4eca0 | ||
|
|
3254d748fd | ||
|
|
9a1143d1f4 | ||
|
|
16079c7c42 | ||
|
|
d9f3b84dd9 | ||
|
|
411abef122 | ||
|
|
d2c0c12231 | ||
|
|
15205abbcf | ||
|
|
14f9bbf832 | ||
|
|
a8e3f5887b | ||
|
|
27b06772c2 | ||
|
|
e312a05de0 | ||
|
|
a15bd220f4 | ||
|
|
1e438b8eff | ||
|
|
e679461ef3 | ||
|
|
9fe7813916 | ||
|
|
4a78e643f0 | ||
|
|
01efa60483 | ||
|
|
d7a7571b00 | ||
|
|
868b8eaec5 | ||
|
|
182c394e7e | ||
|
|
3c441f403a | ||
|
|
c1a34d35cb | ||
|
|
98b4f076f0 | ||
|
|
a7e7557489 | ||
|
|
1ae3be96fa | ||
|
|
faff8d9ee6 | ||
|
|
9c1df052a2 | ||
|
|
5c207050a3 | ||
|
|
1f47b46916 | ||
|
|
c997e9174e | ||
|
|
658d2bb7ba | ||
|
|
34b7222665 | ||
|
|
5b37f915d1 | ||
|
|
a8ab07ed2f | ||
|
|
307ebaade9 | ||
|
|
ee7bbc7b0d | ||
|
|
f7bcd89aa2 | ||
|
|
431cd97efe | ||
|
|
6311d0c01e | ||
|
|
8ded91166e | ||
|
|
6f58255dc2 | ||
|
|
041c5ae4e4 | ||
|
|
3e3d25a279 | ||
|
|
b43342d529 | ||
|
|
63b6bfc35d | ||
|
|
5698e8f7ef | ||
|
|
e6038688ae | ||
|
|
b67abcce27 | ||
|
|
b54d3ee065 | ||
|
|
c8089780d7 | ||
|
|
6279713ab5 | ||
|
|
e3a0416a86 | ||
|
|
8006a0abf2 | ||
|
|
4cef1b2727 | ||
|
|
754d475bba | ||
|
|
86ef858d59 | ||
|
|
12c80c99ff | ||
|
|
c13911c865 | ||
|
|
f195a628cf | ||
|
|
383fb7022f | ||
|
|
c8e4493b8a | ||
|
|
a9eadbe2ed | ||
|
|
f2267de522 | ||
|
|
5b591ba10b | ||
|
|
bba479852b | ||
|
|
ddfef29ac5 | ||
|
|
0c1077e59e | ||
|
|
d293d74410 | ||
|
|
bfe416b708 | ||
|
|
bd3e18169f | ||
|
|
0f8051cf4a | ||
|
|
0da982831f | ||
|
|
5753eb1e11 | ||
|
|
c5042ac840 | ||
|
|
c831e5f83e | ||
|
|
00e39fd437 | ||
|
|
07a99987a7 | ||
|
|
52c6bce5a1 | ||
|
|
2257a42d38 | ||
|
|
a73f0e843a | ||
|
|
6f6ac75754 | ||
|
|
ae9e5a6b5d | ||
|
|
68bc6f5473 | ||
|
|
526b9acead | ||
|
|
baeb65234b | ||
|
|
6da0fcbb1b | ||
|
|
f4f98b248d | ||
|
|
efd667c76a | ||
|
|
ed9e8bc22e | ||
|
|
fbc134388d | ||
|
|
5915a28ba0 | ||
|
|
c8e5be731a | ||
|
|
11eb077113 | ||
|
|
442b7b2e0e | ||
|
|
7636ee17e0 | ||
|
|
db61149b70 | ||
|
|
b4b0b44729 | ||
|
|
7e6d7fea84 | ||
|
|
b3c492d11b | ||
|
|
629c39051a | ||
|
|
114d2be756 |
171
.github/README.md
vendored
|
|
@ -1,4 +1,3 @@
|
|||
[](https://github.com/NixOS/nixpkgs)
|
||||
[](https://actions-badge.atrox.dev/Swarsel/.dotfiles/goto?ref=main)
|
||||
|
||||
###### Disclaimer
|
||||
|
|
@ -10,45 +9,33 @@ That being said, there is a lot of general configuration that you *probably* can
|
|||
# \~SwarselSystems\~
|
||||
|
||||
<p align="center">
|
||||
<img src="https://i.imgur.com/bmgLNcu.png" width="49%" title="Tiling">
|
||||
<img src="https://i.imgur.com/0G7Be6e.png" width="49%" title="Waybar">
|
||||
<img width="49%" title="Tiling" alt="swarselsystems_preview1" src="https://github.com/user-attachments/assets/f6021ab9-6289-497d-8747-28f5d526b75a" />
|
||||
<img width="49%" title="Waybar" alt="swarselsystems_preview2" src="https://github.com/user-attachments/assets/1160d9f7-710c-4046-8fcf-476bb4a0be84" />
|
||||
</p>
|
||||
|
||||
| | |
|
||||
|---------------|---------------------------------|
|
||||
| **Shell:** | zsh |
|
||||
| **DM:** | greetd |
|
||||
| **WM:** | SwayFX |
|
||||
| **Bar:** | Waybar |
|
||||
| **Editor:** | Emacs |
|
||||
| **Terminal:** | kitty |
|
||||
| **Launcher:** | fuzzel |
|
||||
| **Alerts:** | mako |
|
||||
| **Browser:** | firefox |
|
||||
| **Theme:** | city-lights (managed by stylix) |
|
||||
|
||||
## Overview
|
||||
|
||||
- Literate configuration for Nix and Emacs ([SwarselSystems.org](../SwarselSystems.org))
|
||||
- [Literate configuration](https://swarsel.github.io/.dotfiles/) defining my entire infrastructure, including Emacs
|
||||
- Configuration based on flakes for personal hosts as well as servers on:
|
||||
- [NixOS](https://github.com/NixOS/nixpkgs)
|
||||
- [home-manager](https://github.com/nix-community/home-manager) only (no full NixOS) with support from [nixGL](https://github.com/nix-community/nixGL)
|
||||
- [nix-darwin](https://github.com/LnL7/nix-darwin)
|
||||
- [nix-on-droid](https://github.com/nix-community/nix-on-droid)
|
||||
- Streamlined configuration and deployment pipeline:
|
||||
- Framework for [packages](https://github.com/Swarsel/.dotfiles/blob/main/pkgs/default.nix), [overlays](https://github.com/Swarsel/.dotfiles/blob/main/overlays/default.nix), and [modules](https://github.com/Swarsel/.dotfiles/tree/main/modules)
|
||||
- Framework for [packages](https://github.com/Swarsel/.dotfiles/blob/main/pkgs/default.nix), [overlays](https://github.com/Swarsel/.dotfiles/blob/main/overlays/default.nix), [modules](https://github.com/Swarsel/.dotfiles/tree/main/modules), and [library functions](https://github.com/Swarsel/.dotfiles/tree/main/lib/default.nix)
|
||||
- Dynamically generated host configurations
|
||||
- Limited local installer (no secrets handling) with a supported demo build
|
||||
- Fully autonomous remote deployment using [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) and [disko](https://github.com/nix-community/disko) (with secrets handling)
|
||||
- Improved nix tooling
|
||||
- Support for advanced features:
|
||||
- Secrets handling using [sops-nix](https://github.com/Mic92/sops-nix) (pls no pwn ❤️)
|
||||
- Management of non-file-based secrets using private repo
|
||||
- Management of personally identifiable information using [nix-plugins](https://github.com/shlevy/nix-plugins)
|
||||
- Full Yubikey support
|
||||
- LUKS-encryption
|
||||
- Secure boot using [Lanzaboote](https://github.com/nix-community/lanzaboote)
|
||||
- BTRFS-based [Impermanence](https://github.com/nix-community/impermanence)
|
||||
|
||||
- Configuration shared between configurations (configuration for one nixosConfiguration can be defined in another nixosConfiguration)
|
||||
- Global attributes shared between all configurations to reduce attribute redeclaration
|
||||
|
||||
## Documentation
|
||||
|
||||
|
|
@ -62,13 +49,16 @@ Otherwise, the files that are possibly of biggest interest are found here:
|
|||
|
||||
- [SwarselSystems.org](../SwarselSystems.org)
|
||||
- [flake.nix](../flake.nix)
|
||||
- [early-init.el](../programs/emacs/early-init.el)
|
||||
- [init.el](../programs/emacs/init.el)
|
||||
- [early-init.el](../files/emacs/early-init.el)
|
||||
- [init.el](../files/emacs/init.el)
|
||||
|
||||
|
||||
## Getting started
|
||||
### Getting started
|
||||
|
||||
### Demo configuration
|
||||
#### Demo configuration
|
||||
|
||||
<details>
|
||||
<summary>Click here for instructions on how to install the demo system</summary>
|
||||
|
||||
If you just want to see if this configuration is for you, run this command on any system that has `nix` installed:
|
||||
|
||||
|
|
@ -76,16 +66,20 @@ If you just want to see if this configuration is for you, run this command on an
|
|||
nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#swarsel-rebuild -- -u <YOUR_USERNAME>
|
||||
```
|
||||
|
||||
This will activate the `chaostheatre` configuration on your system, which is a de-facto mirror of my main configuration with secret-based settings removed.
|
||||
This will activate the `hotel` configuration on your system, which is a de-facto mirror of my main configuration with secret-based settings removed.
|
||||
Please keep in mind that this limited installer will make local changes to the cloned repository in order to be able to install it (otherwise the builder would fail at fetching my private secrets repository). As such, this should only be used to evaluate the system - if you want to use it longterm, you will need to create a fork and make some changes.
|
||||
</details>
|
||||
|
||||
## Deployment
|
||||
### Deployment
|
||||
|
||||
<details>
|
||||
<summary>Click here for deployment instructions</summary>
|
||||
|
||||
The deployment process for this configuration is mostly automated, there are only a few steps that are needed to be done manually. You can choose between a remote deployment strategy that is also able to deploy new age keys for sops for you and a local installer that will only install the system without any secret handling.
|
||||
|
||||
### Remote deployment (recommended if you have at least one running system)
|
||||
#### Remote deployment (recommended if you have at least one running system)
|
||||
|
||||
0) Fork this repo, and write your own host config at `hosts/nixos/<YOUR_CONFIG_NAME>/default.nix` (you can use one of the other configurations as a template. Also see https://github.com/Swarsel/.dotfiles/tree/main/modules for a list of all additional options). At the very least, you should replace the `secrets/` directory with your own secrets and replace the SSH public keys with your own ones (otherwise I will come visit you!🔓❤️). I personally recommend to use the literate configuration and `org-babel-tangle-file` in Emacs, but you can also simply edit the separate `.nix` files.
|
||||
0) Fork this repo, and write your own host config at `hosts/nixos/<YOUR_ARCHITECTURE>/<YOUR_CONFIG_NAME>/default.nix` (you can use one of the other configurations as a template. Also see https://github.com/Swarsel/.dotfiles/tree/main/modules for a list of all additional options). At the very least, you should replace the `secrets/` directory with your own secrets and replace the SSH public keys with your own ones (otherwise I will come visit you!🔓❤️). I personally recommend to use the literate configuration and `org-babel-tangle-file` in Emacs, but you can also simply edit the separate `.nix` files.
|
||||
1) Have a system with `nix` available booted (this does not need to be installed, i.e. you can use a NixOS installer image; a custom minimal installer ISO can be built by running `just iso` in the root of this repo)
|
||||
2) Make sure that your Yubikey is plugged in or that you have your SSH key available (and configured)
|
||||
3) Run `swarsel-bootstrap -n <CONFIGURATION_NAME> -d <TARGET_IP>` on your existing system.
|
||||
|
|
@ -96,22 +90,118 @@ The deployment process for this configuration is mostly automated, there are onl
|
|||
- you will have to enter the root password once during the final system install
|
||||
5) That should be it! The installer will take care of setting up disks, secrets, and the rest of the hardware configuration! You will still have to sign in manually to some webservices etc.
|
||||
|
||||
### Local deployment (recommended for setting up the first system)
|
||||
#### Local deployment (recommended for setting up the first system)
|
||||
|
||||
1) Boot the latest install ISO from this repository on an UEFI system.
|
||||
2) Run `swarsel-install -n <CONFIGURATION_NAME>`
|
||||
3) Reboot
|
||||
|
||||
Alternatively, to install this from any NixOS live ISO, run `nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#install -- -n <CONFIGURATION_NAME>` at step 2.
|
||||
</details>
|
||||
|
||||
## Infrastructure
|
||||
|
||||
<details>
|
||||
<summary>Click here for a summary of my infrastructure</summary>
|
||||
|
||||
<img width="2202" height="2947" alt="topology" src="https://github.com/user-attachments/assets/0eb37288-47a8-40e3-9211-648eee0ed408" />
|
||||
|
||||
### Programs
|
||||
|
||||
| Topic | Program |
|
||||
|---------------|---------------------------------|
|
||||
|🐚 **Shell** | [zsh](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|
||||
|🚪 **DM** | [greetd](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/common/login.nix) |
|
||||
|🪟 **WM** | [SwayFX](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sway.nix) |
|
||||
|⛩️ **Bar** | [Waybar](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/waybar.nix) |
|
||||
|✒️ **Editor** | [Emacs](https://github.com/Swarsel/.dotfiles/tree/main/files/emacs/init.el) |
|
||||
|🖥️ **Terminal**| [Kitty](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/kitty.nix) |
|
||||
|🚀 **Launcher**| [Fuzzel](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/fuzzel.nix) |
|
||||
|🚨 **Alerts** | [Mako](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/mako.nix) |
|
||||
|🌐 **Browser** | [Firefox](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|
||||
|🎨 **Theme** | [City-Lights (managed by stylix)](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sharedsetup.nix)|
|
||||
|
||||
### Services
|
||||
|
||||
| Topic | Program |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------|
|
||||
|📖 **Books** | [Kavita](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/kavita.nix) |
|
||||
|📼 **Videos** | [Jellyfin](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/jellyfin.nix) |
|
||||
|🎵 **Music** | [Navidrome](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/navidrome.nix) + [Spotifyd](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/spotifyd.nix) + [MPD](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/mpd.nix) |
|
||||
|🗨️ **Messaging** | [Matrix](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/matrix.nix) |
|
||||
|📁 **Filesharing** | [Nectcloud](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/nextcloud.nix) |
|
||||
|🎞️ **Photos** | [Immich](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/immich.nix) |
|
||||
|📄 **Documents** | [Paperless](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/paperless.nix) |
|
||||
|🔄 **File Sync** | [Syncthing](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/syncthing.nix) |
|
||||
|💾 **Backups** | [Restic](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/restic.nix) |
|
||||
|👁️ **Monitoring** | [Grafana](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/monitoring.nix) |
|
||||
|🍴 **RSS** | [FreshRss](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/freshrss.nix) |
|
||||
|🌳 **Git** | [Forgejo](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/forgejo.nix) |
|
||||
|⚓ **Anki Sync** | [Anki Sync Server](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/ankisync.nix) |
|
||||
|🪪 **SSO** | [Kanidm](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/kanidm.nix) + [oauth2-proxy](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/oauth2-proxy.nix) |
|
||||
|💸 **Finance** | [Firefly-III](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/firefly-iii.nix) |
|
||||
|🃏 **Collections** | [Koillection](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/koillection.nix) |
|
||||
|🗃️ **Shell History** | [Atuin](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/atuin.nix) |
|
||||
|📅 **CalDav/CardDav** | [Radicale](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/radicale.nix) |
|
||||
|↔️ **P2P Filesharing** | [Croc](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/croc.nix) |
|
||||
|✂️ **Paste Tool** | [Microbin](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/microbin.nix) |
|
||||
|📸 **Image Sharing** | [Slink](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/slink.nix) |
|
||||
|🔗 **Link Shortener** | [Shlink](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/shlink.nix) |
|
||||
|
||||
### Hosts
|
||||
|
||||
| Name | Hardware | Use |
|
||||
|---------------------|-----------------------------------------------------|-----------------------------------------------------|
|
||||
|💻 **pyramid** | Framework Laptop 16, AMD 7940HS, RX 7700S, 64GB RAM | Work laptop |
|
||||
|💻 **bakery** | Lenovo Ideapad 720S-13IKB | Personal laptop |
|
||||
|💻 **machpizza** | MacBook Pro 2016 | MacOS reference and build sandbox |
|
||||
|🏠 **treehouse** | NVIDIA DGX Spark | AI Workstation, remote builder, hm-only-reference |
|
||||
|🖥️ **summers** | ASUS Z10PA-D8, 2* Intel Xeon E5-2650 v4, 128GB RAM | Homeserver (microvms), remote builder, datastorage |
|
||||
|🖥️ **winters** | ASRock J4105-ITX, 32GB RAM | Homeserver (IoT server in spe) |
|
||||
|🖥️ **hintbooth** | HUNSN RM02, 8GB RAM | Router |
|
||||
|☁️ **stoicclub** | Cloud Server: 1 vCPUs, 8GB RAM | Authoritative dns server |
|
||||
|☁️ **liliputsteps** | Cloud Server: 1 vCPUs, 8GB RAM | SSH bastion |
|
||||
|☁️ **twothreetunnel**| Cloud Server: 2 vCPUs, 8GB RAM | Service proxy |
|
||||
|☁️ **eagleland** | Cloud Server: 2 vCPUs, 8GB RAM | Mailserver |
|
||||
|☁️ **moonside** | Cloud Server: 4 vCPUs, 24GB RAM | Gaming server, syncthing + lightweight services |
|
||||
|☁️ **belchsfactory** | Cloud Server: 4 vCPUs, 24GB RAM | Hydra builder and nix binarycache |
|
||||
|📱 **magicant** | Samsung Galaxy Z Flip 6 | Phone |
|
||||
|💿 **drugstore** | - | NixOS-installer ISO for bootstrapping new hosts |
|
||||
|💿 **brickroad** | - | Kexec tarball for bootstrapping low-memory machines |
|
||||
|❔ **chaotheatre** | - | Demo config for checking out this configuration |
|
||||
|❔ **toto** | - | Helper configuration for testing purposes |
|
||||
</details>
|
||||
|
||||
## General Nix tips & useful links
|
||||
|
||||
<details>
|
||||
<summary>Click here for a summary of nix tips & links</summary>
|
||||
|
||||
- Below is a small list of tips that should be helpful if you are new to the nix ecosystem:
|
||||
|
||||
- Temporarily install any package using `nix shell nixpkgs#<PACKAGE_NAME>` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine. Alternatively, use [comma](https://github.com/nix-community/comma)
|
||||
- Temporarily install any package using `nix shell nixpkgs#<PACKAGE_NAME>` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine.
|
||||
- if you need multiple packages, you can do `nix shell nixpkgs#{<pkg1>,<pkg2>,<pkg3>}`.
|
||||
- you can set `nix.registry` to add more flakes to your registry. I use this to add a `n` shorthand to `nixpkgs`, which allows me to do `nix shell n#{<pkg1>,<pkg2>,<pkg3>}`.
|
||||
- Alternatively, use [comma](https://github.com/nix-community/comma)
|
||||
- More info on `nix [...]` commands: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix
|
||||
- some examples:
|
||||
- `nix flake update <input-name>` lets you update a specific input only.
|
||||
- `nix repl <your flake path>` gives quick insight into your written configuration.
|
||||
- `nix eval <your flake path>#<config attribute>` quickly returns an attribute in your written configuration
|
||||
- `nix fmt` formats your flake using the formatter specified under `formatter` in your `flake.nix`
|
||||
- When you are trying to setup a new configuration part, [GitHub code search](https://github.com/search?q=language%3ANix&type=code) can really help you to find a working configuration. Just filter for `.nix` files and the options you are trying to set up.
|
||||
- getting packages at a different version than your target (or not packaged at all) can be done in most cases easily with fetchFromGithub (https://ryantm.github.io/nixpkgs/builders/fetchers/)
|
||||
- you can easily install old revisions of packages using https://lazamar.co.uk/nix-versions/. You can conveniently spawn a shell with a chosen package available using `vershell <NIXPKGS_REVISION> <PACKAGE>`. Just make sure to pick a revision that has flakes enabled, otherwise you will need the legacy way of spawning the shell (see the link for more info)
|
||||
- when developing modules in a dev branch of another flake, you can use `--override-input` to temporarily use the local directory as the flake source.
|
||||
- including `nixosConfig ? config` in your module arguments is a smart way of enabling a module to pull in config from NixOS or home-manager config, no matter if it is a NixOS system or not.
|
||||
- you can have a quick cli evaluation for nix commands with e.g. `nixpgks.lib` available using `nix-instantiate --strict --eval --expr "let lib = import <nixpkgs/lib>; in <expression>"`.
|
||||
- if you are looking for a specific library, `nix-locate` makes it easy to look for them.
|
||||
- to look at the dependencies pulled in by a tool, use `nix-tree`
|
||||
- to find out which derivation uses another derivation, use `nix store --query --referrers <derivation>`
|
||||
- to get a neat overview of your config changes in recent generations, use `nix profile diff-closures --profile /nix/var/nix/profiles/system`
|
||||
- to get instead the changes since the last boot, use `nix profile diff-closures /run/*-system`
|
||||
- if you just need the generation numbers, use `sudo nix-env --list-generations --profile /nix/var/nix/profiles/system`
|
||||
- to then switch to another generation, you can use `sudo nix-env --switch-generation <generation number> -p /nix/var/nix/profiles/system` followed by `sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch`
|
||||
|
||||
- These links are your best friends:
|
||||
- The nix documentation: https://nix.dev/
|
||||
|
|
@ -144,7 +234,12 @@ Alternatively, to install this from any NixOS live ISO, run `nix run --experimen
|
|||
- and [Wombat's book](https://mhwombat.codeberg.page/nix-book/)
|
||||
- or the [Zero to Nix series](https://zero-to-nix.com/)
|
||||
- Practical nix flakes article: https://serokell.io/blog/practical-nix-flakes
|
||||
- Also useful is the [NixOS wiki](https://nixos.wiki/wiki/Main_Page), but some pages are outdated, so use with some care
|
||||
- A bit on Overlays:
|
||||
- Overview on overlays: [Mastering Nixpkgs overlays article](https://nixcademy.com/posts/mastering-nixpkgs-overlays-techniques-and-best-practice/)
|
||||
- Some examples on best practises: [Do's and Don'ts of overlays](https://flyingcircus.io/news/detailsansicht/nixos-the-dos-and-donts-of-nixpkgs-overlays)
|
||||
- Blog article about overrides: https://bobvanderlinden.me/customizing-packages-in-nix/#using-modified-packages
|
||||
- Also useful is the [official NixOS Wiki](https://wiki.nixos.org/wiki/NixOS_Wiki)
|
||||
- there is also the [unofficial NixOS Wiki](https://nixos.wiki/) that tends to be a bit outdated, use with care
|
||||
- Some resources for specific nix tools:
|
||||
- Flake output reference: https://nixos-and-flakes.thiscute.world/other-usage-of-flakes/outputs
|
||||
- You can find public repositories with modules at https://nur.nix-community.org/ (you should check what you are installing however):
|
||||
|
|
@ -159,13 +254,16 @@ Alternatively, to install this from any NixOS live ISO, run `nix run --experimen
|
|||
- And a few links that are not directly nix-related, but may still serve you well:
|
||||
- List of pre-commit-hooks: https://devenv.sh/reference/options/#pre-commithooks
|
||||
- Waybar configuration: https://github.com/Alexays/Waybar/wiki
|
||||
|
||||
</details>
|
||||
|
||||
## Attributions, Acknowledgements, Inspirations, etc.
|
||||
|
||||
These are in random order (also known as 'the order in which I discovered them'). I would like to express my gratitude to:
|
||||
|
||||
- All the great people who have contributed code for the nix-community, with special mentions for (this list is unfairly incomplete):
|
||||
<details>
|
||||
<summary>Click here to expand...</summary>
|
||||
|
||||
- [guibou](https://github.com/guibou/)
|
||||
- [rycee](https://github.com/rycee)
|
||||
- [adisbladis](https://github.com/adisbladis)
|
||||
|
|
@ -186,7 +284,13 @@ These are in random order (also known as 'the order in which I discovered them')
|
|||
- [infinisil](https://github.com/infinisil)
|
||||
- [zhaofengli](https://github.com/zhaofengli)
|
||||
- [Artturin](https://github.com/Artturin)
|
||||
- [oddlama](https://github.com/oddlama)
|
||||
</details>
|
||||
|
||||
- All the people who have inspired me with their configurations (sadly also highly incomplete):
|
||||
<details>
|
||||
<summary>Click here to expand...</summary>
|
||||
|
||||
- [theSuess](https://github.com/theSuess) with their [home-manager](https://code.kulupu.party/thesuess/home-manager)
|
||||
- [hlissner](https://github.com/hlissner) with their [dotfiles](https://github.com/hlissner/dotfiles)
|
||||
- [drduh](https://github.com/drduh/YubiKey-Guide) with their [YubiKey-Guide](https://github.com/drduh/YubiKey-Guide)
|
||||
|
|
@ -198,6 +302,7 @@ These are in random order (also known as 'the order in which I discovered them')
|
|||
- [EmergentMind](https://github.com/EmergentMind) with their [nix-config](https://github.com/EmergentMind/nix-config)
|
||||
- [librephoenix](https://github.com/librephoenix) with their [nixos-config](https://github.com/librephoenix/nixos-config)
|
||||
- [Xe](https://github.com/Xe) with their [blog](https://xeiaso.net/blog/)
|
||||
|
||||
- [oddlama](https://github.com/oddlama) with their absolutely incredible [nix-config](https:/github.com/oddlama/nix-config)
|
||||
</details>
|
||||
|
||||
If you feel that I forgot to pay you tribute for code that I used in this repository, please shoot me a message and I will fix it :)
|
||||
|
|
|
|||
BIN
.github/swarselsystems_preview.png
vendored
|
Before Width: | Height: | Size: 7.9 MiB |
3
.gitignore
vendored
|
|
@ -1,6 +1,9 @@
|
|||
secrets/keys/pubring.kbx
|
||||
secrets/keys/private-keys-v1.d/
|
||||
install/flake.lock
|
||||
result
|
||||
*.~undo-tree~
|
||||
*.iso
|
||||
*.bak
|
||||
.pre-commit-config.yaml
|
||||
.direnv
|
||||
|
|
|
|||
183
.sops.yaml
|
|
@ -7,10 +7,17 @@ keys:
|
|||
- &swarsel 4BE7925262289B476DBBC17B76FD3810215AE097
|
||||
- &hosts
|
||||
- &winters age1h72072slm2pthn9m2qwjsyy2dsazc6hz97kpzh4gksvv0r2jqecqul8w63
|
||||
- &twothreetunnel age1g7atkxdlt4ymeh7v7aa2yzr2hq2qkvzrc4r49ugttm3n582ymv9qrmpk8d
|
||||
- &liliputsteps age1ly2endyt0y9xyddj6yuj4nw6fa3ltvzlvew4cr4lzs6dv8dkavpqadmyxx
|
||||
- &stoicclub age15klj4t7gpfp69472mne4ue62pp6m4e04dmjyw7yf30qtqd3vl3uqjmcyxm
|
||||
- &belchsfactory age1k73gy5em3js9zklnnkzp5hme9k04lny32fgahmzddknjw5c295asdyr4x6
|
||||
- &eagleland age1cmzh82q8k59yzceuuy2epmqu22g7m84gqvq056mhgehwpmvjadfsc3glc8
|
||||
- &hintbooth age1hsumymvh5mkqlaynrp9lv2w696yk3wtjzlyfmrpeuvh9u2tlwceqh3563x
|
||||
- &bakery age1mjgw3nxlnqdj04mgjz3wn7fj2nl2nxla4p2r2fn4nkvayfgp09pqllxzyh
|
||||
- &toto age16vzhcvz8tyxj8e0f47fy0z4p3dsg0ak4vl52ut3l07a0tz465cxslmhevl
|
||||
- &surface age1zlnxraee6tddr07xn59mx5rdexw8qxryd53eqlsajasfhfy78fkq705dfg
|
||||
- &nbl age16lnmuuxfuxxtty3atnhut8wseppwnhp7rdhmxqd5tdvs9qnjffjq42sqyy
|
||||
- &sync age1glge4e97vgqzh332mqs5990vteezu2m8k4wq3z35jk0q8czw3gks2d7a3h
|
||||
- &moonside age18quey88vge7xytclg2nuq4ncme86dg04lxwczqxczmdchnjg3p0saehsnh
|
||||
creation_rules:
|
||||
- path_regex: secrets/general/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
|
|
@ -18,33 +25,191 @@ creation_rules:
|
|||
- *swarsel
|
||||
age:
|
||||
- *winters
|
||||
- *twothreetunnel
|
||||
- *liliputsteps
|
||||
- *stoicclub
|
||||
- *belchsfactory
|
||||
- *eagleland
|
||||
- *hintbooth
|
||||
- *bakery
|
||||
- *toto
|
||||
- *surface
|
||||
- *nbl
|
||||
- *moonside
|
||||
- path_regex: secrets/repo/[^/]+$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *winters
|
||||
- *twothreetunnel
|
||||
- *liliputsteps
|
||||
- *stoicclub
|
||||
- *belchsfactory
|
||||
- *eagleland
|
||||
- *hintbooth
|
||||
- *bakery
|
||||
- *toto
|
||||
- *surface
|
||||
- *nbl
|
||||
- *moonside
|
||||
- path_regex: secrets/certs/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *nbl
|
||||
- *twothreetunnel
|
||||
- *liliputsteps
|
||||
- *stoicclub
|
||||
- *belchsfactory
|
||||
- *eagleland
|
||||
- *hintbooth
|
||||
- *bakery
|
||||
- *toto
|
||||
- *surface
|
||||
- *winters
|
||||
- path_regex: secrets/winters/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *winters
|
||||
- *moonside
|
||||
- path_regex: secrets/work/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *nbl
|
||||
- path_regex: secrets/sync/[^/]+\.(yaml|json|env|ini)$
|
||||
|
||||
- path_regex: secrets/pyramid/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *sync
|
||||
- *nbl
|
||||
- path_regex: hosts/nixos/x86_64-linux/pyramid/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *nbl
|
||||
|
||||
- path_regex: secrets/moonside/secrets.yaml
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *moonside
|
||||
- path_regex: hosts/nixos/aarch64-linux/moonside/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *moonside
|
||||
|
||||
- path_regex: secrets/belchsfactory/secrets.yaml
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *belchsfactory
|
||||
- path_regex: hosts/nixos/aarch64-linux/belchsfactory/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *belchsfactory
|
||||
|
||||
- path_regex: secrets/bakery/secrets.yaml
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *bakery
|
||||
- path_regex: hosts/nixos/x86_64-linux/bakery/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *bakery
|
||||
|
||||
- path_regex: secrets/winters/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *winters
|
||||
- path_regex: hosts/nixos/x86_64-linux/winters/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *winters
|
||||
|
||||
- path_regex: secrets/eagleland/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *eagleland
|
||||
|
||||
- path_regex: hosts/nixos/x86_64-linux/eagleland/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *eagleland
|
||||
|
||||
|
||||
|
||||
- path_regex: secrets/stoicclub/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *stoicclub
|
||||
- path_regex: hosts/nixos/aarch64-linux/stoicclub/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *stoicclub
|
||||
|
||||
- path_regex: secrets/liliputsteps/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *liliputsteps
|
||||
- path_regex: hosts/nixos/aarch64-linux/liliputsteps/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *liliputsteps
|
||||
|
||||
- path_regex: secrets/twothreetunnel/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *twothreetunnel
|
||||
- path_regex: hosts/nixos/aarch64-linux/twothreetunnel/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *twothreetunnel
|
||||
|
||||
- path_regex: hosts/nixos/x86_64-linux/summers/secrets/
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
|
||||
- path_regex: hosts/nixos/x86_64-linux/hintbooth/secrets/
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
age:
|
||||
- *hintbooth
|
||||
|
||||
- path_regex: hosts/darwin/nbm-imba-166/secrets/pii.nix.enc
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *swarsel
|
||||
|
|
|
|||
29685
SwarselSystems.org
|
|
@ -1,39 +0,0 @@
|
|||
{ self, inputs, pkgs, system, ... }:
|
||||
{
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = "${self}";
|
||||
hooks = {
|
||||
check-added-large-files.enable = true;
|
||||
check-case-conflicts.enable = true;
|
||||
check-executables-have-shebangs.enable = true;
|
||||
check-shebang-scripts-are-executable.enable = false;
|
||||
check-merge-conflicts.enable = true;
|
||||
deadnix.enable = true;
|
||||
detect-private-keys.enable = true;
|
||||
end-of-file-fixer.enable = true;
|
||||
fix-byte-order-marker.enable = true;
|
||||
flake-checker.enable = true;
|
||||
forbid-new-submodules.enable = true;
|
||||
mixed-line-endings.enable = true;
|
||||
nixpkgs-fmt.enable = true;
|
||||
statix.enable = true;
|
||||
trim-trailing-whitespace.enable = true;
|
||||
|
||||
destroyed-symlinks = {
|
||||
enable = true;
|
||||
entry = "${inputs.pre-commit-hooks.checks.${system}.pre-commit-hooks}/bin/destroyed-symlinks";
|
||||
};
|
||||
|
||||
shellcheck = {
|
||||
enable = true;
|
||||
entry = "${pkgs.shellcheck}/bin/shellcheck --shell=bash";
|
||||
};
|
||||
|
||||
shfmt = {
|
||||
enable = true;
|
||||
entry = "${pkgs.shfmt}/bin/shfmt -i 4 -sr -d -s -l";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
;; -*- lexical-binding: t; -*-
|
||||
(defvar swarsel-file-name-handler-alist file-name-handler-alist)
|
||||
(defvar swarsel-vc-handled-backends vc-handled-backends)
|
||||
|
||||
|
|
@ -9,8 +10,6 @@
|
|||
(add-hook 'emacs-startup-hook
|
||||
(lambda ()
|
||||
(progn
|
||||
;; (setq gc-cons-threshold (* 1000 1000 8)
|
||||
;; (setq gc-cons-threshold #x40000000
|
||||
(setq gc-cons-threshold (* 32 1024 1024)
|
||||
gc-cons-percentage 0.1
|
||||
jit-lock-defer-time 0.05
|
||||
120
files/firefox/chrome/userChrome.css
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_toolbox.css made available under Mozilla Public License v. 2.0
|
||||
See the above repository for updates as well as full license text. */
|
||||
|
||||
/* Hide the whole toolbar area unless urlbar is focused or cursor is over the toolbar
|
||||
* Dimensions on non-Win10 OS probably needs to be adjusted.
|
||||
*/
|
||||
|
||||
:root{
|
||||
--uc-autohide-toolbox-delay: 200ms; /* Wait 0.1s before hiding toolbars */
|
||||
--uc-toolbox-rotation: 82deg; /* This may need to be lower on mac - like 75 or so */
|
||||
|
||||
--base00: #1D252C;
|
||||
--base01: #171D23;
|
||||
--base02: #5EC4FF;
|
||||
--base03: #566C7D;
|
||||
--base04: #5EC4FF;
|
||||
--base05: #A0B3C5;
|
||||
--base06: #C06ECE;
|
||||
--base07: #A0B3C5;
|
||||
--base08: #D95468;
|
||||
--base09: #FFA880;
|
||||
--base0A: #5EC4FF;
|
||||
--base0B: #8BD49C;
|
||||
--base0C: #008B94;
|
||||
--base0D: #5EC4FF;
|
||||
--base0E: #C06ECE;
|
||||
--base0F: #5EC4FF;
|
||||
|
||||
}
|
||||
|
||||
:root[sizemode="maximized"]{
|
||||
--uc-toolbox-rotation: 88.5deg;
|
||||
}
|
||||
|
||||
@media (-moz-platform: windows){
|
||||
:root:not([lwtheme]) #navigator-toolbox{ background-color: -moz-dialog !important; }
|
||||
}
|
||||
|
||||
:root[sizemode="fullscreen"],
|
||||
:root[sizemode="fullscreen"] #navigator-toolbox{ margin-top: 0 !important; }
|
||||
|
||||
#navigator-toolbox{
|
||||
--browser-area-z-index-toolbox: 3;
|
||||
position: fixed !important;
|
||||
background-color: var(--lwt-accent-color,black) !important;
|
||||
transition: transform 82ms linear, opacity 82ms linear !important;
|
||||
transition-delay: var(--uc-autohide-toolbox-delay) !important;
|
||||
transform-origin: top;
|
||||
transform: rotateX(var(--uc-toolbox-rotation));
|
||||
opacity: 0;
|
||||
line-height: 0;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
width: 100vw;
|
||||
}
|
||||
:root[sessionrestored] #urlbar[popover]{
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: transform 82ms linear var(--uc-autohide-toolbox-delay), opacity 0ms calc(var(--uc-autohide-toolbox-delay) + 82ms);
|
||||
transform-origin: 0px calc(0px - var(--tab-min-height) - var(--tab-block-margin) * 2);
|
||||
transform: rotateX(89.9deg);
|
||||
}
|
||||
|
||||
:root[window-modal-open] #urlbar[popover],
|
||||
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel), > #tab-group-editor > [panelopen]) ~ toolbox #urlbar[popover],
|
||||
/* swarsel: removed :hover from below line */
|
||||
#navigator-toolbox:is(:focus-within,[movingtab]) #urlbar[popover],
|
||||
#urlbar-container > #urlbar[popover]:is([focused],[open]){
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
transition-delay: 33ms;
|
||||
transform: rotateX(0deg);
|
||||
}
|
||||
|
||||
:root[window-modal-open] #navigator-toolbox,
|
||||
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel), > #tab-group-editor > [panelopen]) ~ toolbox,
|
||||
#navigator-toolbox:has(#urlbar:is([open],[focus-within])),
|
||||
/* swarsel: removed :hover from below line */
|
||||
#navigator-toolbox:is(:focus-within,[movingtab]){
|
||||
transition-delay: 33ms !important;
|
||||
transform: rotateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
/* This makes things like OS menubar/taskbar show the toolbox when hovered in maximized windows.
|
||||
* Unfortunately it also means that other OS native surfaces (such as context menu on macos)
|
||||
* and other always-on-top applications will trigger toolbox to show up. */
|
||||
@media -moz-pref("userchrome.autohide-toolbox.unhide-by-native-ui.enabled"){
|
||||
:root[sizemode="maximized"]:not(:hover){
|
||||
#navigator-toolbox:not(:-moz-window-inactive),
|
||||
#urlbar[popover]:not(:-moz-window-inactive){
|
||||
transition-delay: 33ms !important;
|
||||
transform: rotateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox > *{ line-height: normal; pointer-events: auto }
|
||||
|
||||
/* Don't apply transform before window has been fully created */
|
||||
:root:not([sessionrestored]) #navigator-toolbox{ transform:none !important }
|
||||
|
||||
:root[customizing] #navigator-toolbox{
|
||||
position: relative !important;
|
||||
transform: none !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox[inFullscreen] > #PersonalToolbar,
|
||||
#PersonalToolbar:is([collapsed=""],[collapsed="true"]){ display: none }
|
||||
|
||||
/* This is a bit hacky fix for an issue that will make urlbar zero pixels tall after you enter customize mode */
|
||||
#urlbar[breakout][breakout-extend] > .urlbar-input-container{
|
||||
padding-block: calc(min(4px,(var(--urlbar-container-height) - var(--urlbar-height)) / 2) + var(--urlbar-container-padding)) !important;
|
||||
}
|
||||
|
||||
/* Uncomment the following for compatibility with tabs_on_bottom.css - this isn't well tested though */
|
||||
/*
|
||||
#navigator-toolbox{ flex-direction: column; display: flex; }
|
||||
*/
|
||||
160
files/firefox/tridactyl/themes/swarsel.css
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
:root {
|
||||
|
||||
--base00: #1D252C;
|
||||
--base01: #171D23;
|
||||
--base02: #5EC4FF;
|
||||
--base03: #566C7D;
|
||||
--base04: #5EC4FF;
|
||||
--base05: #A0B3C5;
|
||||
--base06: #C06ECE;
|
||||
--base07: #A0B3C5;
|
||||
--base08: #D95468;
|
||||
--base09: #FFA880;
|
||||
--base0A: #5EC4FF;
|
||||
--base0B: #8BD49C;
|
||||
--base0C: #008B94;
|
||||
--base0D: #5EC4FF;
|
||||
--base0E: #C06ECE;
|
||||
--base0F: #5EC4FF;
|
||||
|
||||
--tridactyl-def-fg: var(--base02);
|
||||
--tridactyl-cmdl-bg: var(--base00);
|
||||
--tridactyl-cmdl-fg: var(--base0C);
|
||||
|
||||
--tridactyl-font-family: "San Francisco", sans-serif;
|
||||
|
||||
--tridactyl-cmdl-font-size: 1.5rem;
|
||||
--tridactyl-cmdl-line-height: 1.5;
|
||||
|
||||
--tridactyl-cmplt-option-height: 1.4em;
|
||||
--tridactyl-cmplt-font-size: var(--tridactyl-small-font-size);
|
||||
--tridactyl-cmplt-border-top: unset;
|
||||
|
||||
--tridactyl-status-font-size: 9px;
|
||||
--tridactyl-status-font-family: "Fira Code", monospace;
|
||||
--tridactyl-status-border: 1px var(--tridactyl-fg) solid;
|
||||
|
||||
--tridactyl-header-font-size: var(--tridactyl-small-font-size);
|
||||
--tridactyl-header-font-weight: 200;
|
||||
--tridactyl-header-border-bottom: unset;
|
||||
|
||||
--tridactyl-hintspan-font-size: var(--tridactyl-font-size);
|
||||
--tridactyl-hint-active-fg: none;
|
||||
|
||||
}
|
||||
|
||||
:root #command-line-holder {
|
||||
order: 1;
|
||||
border: 2px solid var(--tridactyl-cmdl-fg);
|
||||
color: var(--tridactyl-cmdl-bg);
|
||||
}
|
||||
|
||||
:root #tridactyl-input {
|
||||
width: 90%;
|
||||
padding: 1rem;
|
||||
color: var(--tridactyl-def-fg);
|
||||
}
|
||||
|
||||
:root #completions table {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 200;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
padding: 1rem;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
:root #completions > div {
|
||||
max-height: calc(20 * var(--tridactyl-cmplt-option-height));
|
||||
min-height: calc(10 * var(--tridactyl-cmplt-option-height));
|
||||
}
|
||||
|
||||
/* COMPLETIONS */
|
||||
|
||||
:root #completions {
|
||||
font-weight: 200;
|
||||
order: 2;
|
||||
color: var(--tridactyl-def-fg);
|
||||
background: var(--tridactyl-cmdl-bg);
|
||||
|
||||
}
|
||||
|
||||
/* Olie doesn't know how CSS inheritance works */
|
||||
:root #completions .HistoryCompletionSource {
|
||||
max-height: unset;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
:root #completions .HistoryCompletionSource table {
|
||||
width: 100%;
|
||||
font-size: 9pt;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
/* redundancy 2: redundancy 2: more redundancy */
|
||||
:root #completions .BmarkCompletionSource {
|
||||
max-height: unset;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
:root #completions table tr { white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
:root #completions .url {
|
||||
background: var(--tridactyl-cmdl-bg);
|
||||
}
|
||||
|
||||
:root #completions .focused {
|
||||
background: #44391F;
|
||||
}
|
||||
:root #completions .focused .url {
|
||||
background: #44391F;
|
||||
}
|
||||
|
||||
:root #completions .BufferCompletionSource table {
|
||||
width: unset;
|
||||
font-size: unset;
|
||||
border-spacing: unset;
|
||||
table-layout: unset;
|
||||
}
|
||||
|
||||
:root #completions table tr {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
:root #completions .sectionHeader {
|
||||
background: unset;
|
||||
padding: 1rem !important;
|
||||
padding-left: unset;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
:root #cmdline_iframe {
|
||||
position: fixed !important;
|
||||
bottom: unset;
|
||||
top: 25% !important;
|
||||
left: 10% !important;
|
||||
z-index: 2147483647 !important;
|
||||
width: 80% !important;
|
||||
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 15px !important;
|
||||
}
|
||||
|
||||
:root .TridactylStatusIndicator {
|
||||
position: fixed !important;
|
||||
bottom: 0 !important;
|
||||
font-weight: 200 !important;
|
||||
padding: 0.8ex !important;
|
||||
}
|
||||
|
||||
/* #Shydactyl-normal { */
|
||||
/* border-color: green !important; */
|
||||
/* } */
|
||||
|
||||
/* #Shydactyl-insert { */
|
||||
/* border-color: yellow !important; */
|
||||
/* } */
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
sanitise tridactyllocal tridactylsync
|
||||
|
||||
colourscheme base16-codeschool
|
||||
colourscheme swarsel
|
||||
|
||||
" General Settings
|
||||
set update.lastchecktime 1720629386560
|
||||
|
|
@ -12,9 +12,12 @@ set configversion 2.0
|
|||
set searchurls.no https://search.nixos.org/options?query=
|
||||
set searchurls.np https://search.nixos.org/packages?query=
|
||||
set searchurls.hm https://home-manager-options.extranix.com/?query=
|
||||
set searchurls.@c https://vbc.atlassian.net/wiki/search?text=
|
||||
set searchurls.@j https://vbc.atlassian.net/issues/?jql=textfields%20~%20%22%s*%22&wildcardFlag=true
|
||||
set completions.Tab.statusstylepretty true
|
||||
set hintfiltermode vimperator-reflow
|
||||
set hintnames numeric
|
||||
unbind --mode=hint <Space>
|
||||
|
||||
" Binds
|
||||
bind <C-m> buffer #
|
||||
|
|
@ -22,12 +25,56 @@ bind gd tabdetach
|
|||
bind gD composite tabduplicate; tabdetach
|
||||
bind d composite tabprev; tabclose #
|
||||
bind D tabclose
|
||||
bind c hint
|
||||
bind c hint -J
|
||||
bindurl ^http(s)?://www\.google\.com c hint -Jc [class="LC20lb MBeuO DKV0Md"],[class="YmvwI"],[class="YyVfkd"],[class="fl"]
|
||||
bindurl ^http(s)?://news\.ycombinator\.com c hint -Jc [class="titleline"],[class="age"]
|
||||
bindurl ^http(s)?://lobste\.rs c hint -Jc [class="u-url"],[class="comments_label"]
|
||||
bindurl ^http(s)?://reddit\.com c hint -Jc [class="title may-blank loggedin"],[class="bylink comments may-blank"]
|
||||
bindurl ^http(s)?://github\.com c hint -Jc [class="Link--primary"],[class="AppHeader-button Button--secondary Button--medium Button p-0 color-fg-muted"],[class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"],[class="prc-ActionList-ItemLabel-TmBhn"],[class="PRIVATE_TreeView-item-content-text prc-TreeView-TreeViewItemContentText-smZM-"]
|
||||
bindurl ^http(s)?://vbc\.atlassian\.net\/wiki c hint -Jc [class="_1reo15vq _18m915vq _1bto1l2s _kqswh2mm _o5721q9c _syaz1fxt"],[class="_11c81ixg _1reo15vq _18m915vq _18s81b66 _kqswh2mm _k48p1wq8 _o5721q9c _1bto1l2s _u5f31b66"],[class="_1r04ze3t _kqswstnw"],[class="css-a61etj"],[class="jira-macro-table-underline-pdfexport"]
|
||||
bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line
|
||||
|
||||
" Work
|
||||
command tab_or_tabopen jsb -p (async () => {let tabs = await browser.tabs.query({}); let tab = tabs.find(t => t.url.includes(JS_ARG)); if (tab) {browser.tabs.update(tab.id, { active: true });} else {tri.excmds.tabopen(JS_ARG);}})()
|
||||
|
||||
command tab_or_tabopen_local jsb -p (async () => {const currentWindow = await browser.windows.getCurrent(); const tabs = await browser.tabs.query({ windowId: currentWindow.id }); const tab = tabs.find(t => t.url.includes(JS_ARG)); if (tab) {browser.tabs.update(tab.id, { active: true });} else {tri.excmds.tabopen(JS_ARG);}})()
|
||||
|
||||
bind gwa tab_or_tabopen_local apic-impimba-1.m.imp.ac.at
|
||||
bind gwA tab_or_tabopen_local artifactory.imp.ac.at
|
||||
bind gwb tab_or_tabopen_local bitbucket.vbc.ac.at
|
||||
bind gwc tab_or_tabopen_local vbc.atlassian.net/wiki
|
||||
bind gwd tab_or_tabopen_local datadomain-impimba-2.imp.ac.at
|
||||
bind gwe tab_or_tabopen_local exivity.vbc.ac.at
|
||||
bind gwg tab_or_tabopen_local github.com
|
||||
bind gwG tab_or_tabopen_local goc.egi.eu
|
||||
bind gwh tab_or_tabopen_local jupyterhub.vbc.ac.at
|
||||
bind gwj tab_or_tabopen_local jenkins.vbc.ac.at
|
||||
bind gwJ tab_or_tabopen_local test-jenkins.vbc.ac.at
|
||||
bind gwl tab_or_tabopen_local lucid.app
|
||||
bind gwm tab_or_tabopen_local monitoring.vbc.ac.at/grafana
|
||||
bind gwM tab_or_tabopen_local monitoring.vbc.ac.at/prometheus
|
||||
bind gwn tab_or_tabopen_local netbox.vbc.ac.at
|
||||
bind gwN tab_or_tabopen_local nap.imp.ac.at
|
||||
bind gwo tab_or_tabopen_local outlook.office.com
|
||||
bind gws tab_or_tabopen_local satellite.vbc.ac.at
|
||||
bind gwt tab_or_tabopen_local tower.vbc.ac.at
|
||||
bind gwv tab_or_tabopen_local vc-impimba-1.m.imp.ac.at/ui
|
||||
bind gwx tab_or_tabopen_local xclarity.vbc.ac.at
|
||||
|
||||
unbind --mode=normal gh
|
||||
bind ghp tab_or_tabopen_local https://github.com/pulls
|
||||
bind ghi tab_or_tabopen_local https://github.com/issues/assigned?q=is%3Aissue%20state%3Aopen%20archived%3Afalse%20(assignee%3A%40me%20OR%20author%3A%40me)%20sort%3Aupdated-desc
|
||||
bind ghv tab_or_tabopen_local github.com/orgs/vbc-it/repositories
|
||||
bind ghc tab_or_tabopen_local github.com/orgs/CLIP-HPC/repositories
|
||||
bind ghd tab_or_tabopen_local github.com/Swarsel/.dotfiles
|
||||
bind ghni tab_or_tabopen_local github.com/NixOS/nixpkgs/issues
|
||||
bind ghnp tab_or_tabopen_local github.com/NixOS/nixpkgs/pulls
|
||||
|
||||
unbind --mode=normal gp
|
||||
bind gprn tab_or_tabopen_local www.reddit.com/r/NixOS/
|
||||
bind gpd tab_or_tabopen_local discourse.nixos.org/
|
||||
bind gpp tab_or_tabopen_local parkour.wien/categories
|
||||
|
||||
" Search in page
|
||||
set findcase smart
|
||||
bind / fillcmdline find
|
||||
|
|
@ -77,11 +124,20 @@ set allowautofocus false
|
|||
jsb browser.webRequest.onHeadersReceived.addListener(tri.request.clobberCSP,{urls:["<all_urls>"],types:["main_frame"]},["blocking","responseHeaders"])
|
||||
|
||||
" default is 300ms
|
||||
set hintdelay 100
|
||||
set hintdelay 500
|
||||
|
||||
" Some pages like github break on the tridactyl quick search. have this as a fallback
|
||||
unbind <C-f>
|
||||
|
||||
" Do not let websites steal sitefocus
|
||||
set allowautofocus false
|
||||
|
||||
" whitelist sites
|
||||
" :seturl [URL regex for sites with text editors you use] allowautofocus true
|
||||
|
||||
" stronger blacklist for specific sites
|
||||
seturl vbc.atlassian.net preventautofocusjackhammer true
|
||||
|
||||
" Subconfig Settings
|
||||
seturl www.google.com followpagepatterns.next Next
|
||||
seturl www.google.com followpagepatterns.prev Previous
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
|
||||
# max. 50 chars is here: #
|
||||
# <type>[optional scope]: <description>
|
||||
# types: feat, fix, build, chore, ci, docs, style, refactor, perf, test
|
||||
|
|
@ -6,7 +6,7 @@ command_not_found_handle() {
|
|||
fi
|
||||
|
||||
echo -n "searching nix-index..."
|
||||
ATTRS=$(@nix-locate@ --minimal --no-group --type x --type s --top-level --whole-name --at-root "/bin/$1")
|
||||
ATTRS=$(@nix-locate@ --minimal --no-group --type x --type s --whole-name --at-root "/bin/$1")
|
||||
|
||||
case $(echo -n "$ATTRS" | grep -c "^") in
|
||||
0)
|
||||
7
files/scripts/project.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
if [ ! -d "$(pwd)/.git" ]; then
|
||||
git init
|
||||
fi
|
||||
nix flake init --template "$FLAKE"#"$1"
|
||||
direnv allow
|
||||
12
files/scripts/quickpass.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
shopt -s nullglob globstar
|
||||
|
||||
notify-send "$(env | grep -E 'WAYLAND|SWAY')"
|
||||
|
||||
password="$1"
|
||||
|
||||
pass show "$password" | {
|
||||
IFS= read -r pass
|
||||
printf %s "$pass"
|
||||
} | wtype -
|
||||
|
||||
notify-send -u critical -a pass -t 1000 "Typed Password"
|
||||
11
files/scripts/sshrm.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
HISTFILE="$HOME"/.histfile
|
||||
|
||||
last_ssh_cmd=$(grep -E "ssh " "$HISTFILE" | sed -E 's/^: [0-9]+:[0-9]+;//' | grep "^ssh " | tail -1)
|
||||
host=$(echo "$last_ssh_cmd" | sed -E 's/.*ssh ([^@ ]+@)?([^ ]+).*/\2/')
|
||||
|
||||
if [[ -n $host ]]; then
|
||||
echo "Removing SSH host key for: $host"
|
||||
ssh-keygen -R "$host"
|
||||
else
|
||||
echo "No valid SSH command found in history."
|
||||
fi
|
||||
|
|
@ -1,12 +1,15 @@
|
|||
# highly inspired by https://github.com/EmergentMind/nix-config/blob/dev/scripts/bootstrap-nixos.sh
|
||||
# highly inspired by https://github.com/EmergentMind/nix-config/blob/dev/files/scripts/bootstrap-nixos.sh
|
||||
set -eo pipefail
|
||||
|
||||
target_hostname=""
|
||||
target_destination=""
|
||||
target_arch=""
|
||||
target_user="swarsel"
|
||||
ssh_port="22"
|
||||
persist_dir=""
|
||||
disk_encryption=0
|
||||
disk_encryption_args=""
|
||||
no_disko_deps="false"
|
||||
temp=$(mktemp -d)
|
||||
|
||||
function help_and_exit() {
|
||||
|
|
@ -18,6 +21,7 @@ function help_and_exit() {
|
|||
echo "ARGS:"
|
||||
echo " -n <target_hostname> specify target_hostname of the target host to deploy the nixos config on."
|
||||
echo " -d <target_destination> specify ip or url to the target host."
|
||||
echo " -a <targeit_arch> specify the architecture of the target host."
|
||||
echo " target during install process."
|
||||
echo
|
||||
echo "OPTIONS:"
|
||||
|
|
@ -25,6 +29,7 @@ function help_and_exit() {
|
|||
echo " Default='${target_user}'."
|
||||
echo " --port <ssh_port> specify the ssh port to use for remote access. Default=${ssh_port}."
|
||||
echo " --debug Enable debug mode."
|
||||
echo " --no-disko-deps Upload only disk script and not dependencies (for use on low ram)."
|
||||
echo " -h | --help Print this help."
|
||||
exit 0
|
||||
}
|
||||
|
|
@ -100,6 +105,10 @@ while [[ $# -gt 0 ]]; do
|
|||
shift
|
||||
target_destination=$1
|
||||
;;
|
||||
-a)
|
||||
shift
|
||||
target_arch=$1
|
||||
;;
|
||||
-u)
|
||||
shift
|
||||
target_user=$1
|
||||
|
|
@ -108,6 +117,9 @@ while [[ $# -gt 0 ]]; do
|
|||
shift
|
||||
ssh_port=$1
|
||||
;;
|
||||
--no-disko-deps)
|
||||
no_disko_deps="true"
|
||||
;;
|
||||
--debug)
|
||||
set -x
|
||||
;;
|
||||
|
|
@ -120,6 +132,17 @@ while [[ $# -gt 0 ]]; do
|
|||
shift
|
||||
done
|
||||
|
||||
if [[ $target_arch == "" || $target_destination == "" || $target_hostname == "" ]]; then
|
||||
red "error: target_arch, target_destination or target_hostname not set."
|
||||
help_and_exit
|
||||
fi
|
||||
|
||||
LOCKED="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.node.lockFromBootstrapping)"
|
||||
if [[ $LOCKED == "true" ]]; then
|
||||
red "THIS SYSTEM IS LOCKED FROM BOOTSTRAPPING"
|
||||
exit
|
||||
fi
|
||||
|
||||
green "~SwarselSystems~ remote installer"
|
||||
green "Reading system information for $target_hostname ..."
|
||||
|
||||
|
|
@ -130,6 +153,11 @@ CRYPTED="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.sw
|
|||
if [[ $CRYPTED == "true" ]]; then
|
||||
green "Encryption: ✓"
|
||||
disk_encryption=1
|
||||
disk_encryption_args=(
|
||||
--disk-encryption-keys
|
||||
/tmp/disko-password
|
||||
/tmp/disko-password
|
||||
)
|
||||
else
|
||||
red "Encryption: X"
|
||||
disk_encryption=0
|
||||
|
|
@ -174,6 +202,8 @@ if [ ! -d "$FLAKE" ]; then
|
|||
fi
|
||||
|
||||
cd "$FLAKE"
|
||||
|
||||
rm install/flake.lock || true
|
||||
git_root=$(git rev-parse --show-toplevel)
|
||||
# ------------------------
|
||||
green "Wiping known_hosts of $target_destination"
|
||||
|
|
@ -199,7 +229,7 @@ if [ "$disk_encryption" -eq 1 ]; then
|
|||
green "Please confirm passphrase:"
|
||||
read -rs luks_passphrase_confirm
|
||||
if [[ $luks_passphrase == "$luks_passphrase_confirm" ]]; then
|
||||
$ssh_root_cmd "/bin/sh -c 'echo $luks_passphrase > /tmp/disko-password'"
|
||||
$ssh_root_cmd "echo '$luks_passphrase' > /tmp/disko-password"
|
||||
break
|
||||
else
|
||||
red "Passwords do not match"
|
||||
|
|
@ -210,15 +240,24 @@ fi
|
|||
green "Generating hardware-config.nix for $target_hostname and adding it to the nix-config."
|
||||
$ssh_root_cmd "nixos-generate-config --force --no-filesystems --root /mnt"
|
||||
|
||||
green "Injecting initialSetup"
|
||||
$ssh_root_cmd "sed -i '/ boot.extraModulePackages /a \ swarselsystems.initialSetup = true;' /mnt/etc/nixos/hardware-configuration.nix"
|
||||
|
||||
mkdir -p "$FLAKE"/hosts/nixos/"$target_hostname"
|
||||
$scp_cmd root@"$target_destination":/mnt/etc/nixos/hardware-configuration.nix "${git_root}"/hosts/nixos/"$target_hostname"/hardware-configuration.nix
|
||||
mkdir -p "$FLAKE"/hosts/nixos/"$target_arch"/"$target_hostname"
|
||||
$scp_cmd root@"$target_destination":/mnt/etc/nixos/hardware-configuration.nix "${git_root}"/hosts/nixos/"$target_arch"/"$target_hostname"/hardware-configuration.nix
|
||||
# ------------------------
|
||||
# green "Generating hostkey for ssh initrd"
|
||||
# $ssh_root_cmd "mkdir -p $temp/etc/secrets/initrd /etc/secrets/initrd"
|
||||
# $ssh_root_cmd "ssh-keygen -t ed25519 -N '' -f $temp/etc/secrets/initrd/ssh_host_ed25519_key"
|
||||
# $ssh_root_cmd "cp $temp/etc/secrets/initrd/ssh_host_ed25519_key /etc/secrets/initrd/ssh_host_ed25519_key"
|
||||
# ------------------------
|
||||
|
||||
green "Deploying minimal NixOS installation on $target_destination"
|
||||
SHELL=/bin/sh nix run github:nix-community/nixos-anywhere -- --ssh-port "$ssh_port" --extra-files "$temp" --flake .#"$target_hostname" root@"$target_destination"
|
||||
|
||||
if [[ $no_disko_deps == "true" ]]; then
|
||||
green "Building without disko dependencies (using custom kexec)"
|
||||
nix run github:nix-community/nixos-anywhere/1.10.0 -- "${disk_encryption_args[@]}" --no-disko-deps --ssh-port "$ssh_port" --extra-files "$temp" --flake ./install#"$target_hostname" --kexec "$(nix build --print-out-paths .#packages."$target_arch".swarsel-kexec)/swarsel-kexec-$target_arch.tar.gz" root@"$target_destination"
|
||||
else
|
||||
green "Building with disko dependencies (using nixos-images kexec)"
|
||||
nix run github:nix-community/nixos-anywhere/1.10.0 -- "${disk_encryption_args[@]}" --ssh-port "$ssh_port" --extra-files "$temp" --flake ./install#"$target_hostname" root@"$target_destination"
|
||||
fi
|
||||
|
||||
echo "Updating ssh host fingerprint at $target_destination to ~/.ssh/known_hosts"
|
||||
ssh-keyscan -p "$ssh_port" "$target_destination" >> ~/.ssh/known_hosts || true
|
||||
|
|
@ -244,8 +283,6 @@ if [[ $SECUREBOOT == "true" ]]; then
|
|||
$ssh_root_cmd "sbctl enroll-keys --ignore-immutable --microsoft || true"
|
||||
fi
|
||||
# ------------------------
|
||||
green "Disabling initialSetup"
|
||||
sed -i '/swarselsystems\.initialSetup = true;/d' "$git_root"/hosts/nixos/"$target_hostname"/hardware-configuration.nix
|
||||
|
||||
if [ -n "$persist_dir" ]; then
|
||||
$ssh_root_cmd "cp /etc/machine-id $persist_dir/etc/machine-id || true"
|
||||
|
|
@ -281,17 +318,19 @@ if yes_or_no "Do you want to manually edit .sops.yaml now?"; then
|
|||
fi
|
||||
green "Updating all secrets files to reflect updates .sops.yaml"
|
||||
sops updatekeys --yes --enable-local-keyservice "${git_root}"/secrets/*/secrets.yaml
|
||||
sops updatekeys --yes --enable-local-keyservice "${git_root}"/hosts/nixos/"$target_arch"/"$target_hostname"/secrets/pii.nix.enc
|
||||
# --------------------------
|
||||
green "Making ssh_host_ed25519_key available to home-manager for user $target_user"
|
||||
sed -i "/$target_hostname/d; /$target_destination/d" ~/.ssh/known_hosts
|
||||
$ssh_root_cmd "mkdir -p /home/$target_user/.ssh; chown -R $target_user:users /home/$target_user/.ssh/"
|
||||
$scp_cmd root@"$target_destination":/etc/ssh/ssh_host_ed25519_key root@"$target_destination":/home/"$target_user"/.ssh/ssh_host_ed25519_key
|
||||
$ssh_root_cmd "chown $target_user:users /home/swarsel/.ssh/ssh_host_ed25519_key"
|
||||
$ssh_root_cmd "chown $target_user:users /home/$target_user/.ssh/ssh_host_ed25519_key"
|
||||
# __________________________
|
||||
|
||||
if yes_or_no "Add ssh host fingerprints for git upstream repositories? (This is needed for building the full config)"; then
|
||||
green "Adding ssh host fingerprints for git{lab,hub}"
|
||||
$ssh_cmd "mkdir -p /home/$target_user/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com swagit.swarsel.win >> /home/$target_user/.ssh/known_hosts"
|
||||
$ssh_root_cmd "mkdir -p /root/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com swagit.swarsel.win >> /root/.ssh/known_hosts"
|
||||
$ssh_cmd "mkdir -p /home/$target_user/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com | tee /home/$target_user/.ssh/known_hosts"
|
||||
$ssh_root_cmd "mkdir -p /root/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com | tee /root/.ssh/known_hosts"
|
||||
fi
|
||||
# --------------------------
|
||||
|
||||
|
|
@ -308,11 +347,18 @@ if yes_or_no "Do you want to copy your full nix-config and nix-secrets to $targe
|
|||
fi
|
||||
|
||||
if yes_or_no "Do you want to rebuild immediately?"; then
|
||||
green "Rebuilding nix-config on $target_hostname"
|
||||
yellow "Reminder: The password is 'setup'"
|
||||
$ssh_root_cmd "mkdir -p /root/.local/share/nix/; printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' > /root/.local/share/nix/trusted-settings.json"
|
||||
$ssh_cmd -oForwardAgent=yes "cd .dotfiles && sudo nixos-rebuild --show-trace --flake .#$target_hostname switch"
|
||||
fi
|
||||
green "Building nix-config for $target_hostname"
|
||||
# yellow "Reminder: The password is 'setup'"
|
||||
$ssh_root_cmd "mkdir -p /root/.local/share/nix/; printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' | tee /root/.local/share/nix/trusted-settings.json"
|
||||
# $ssh_cmd -oForwardAgent=yes "cd .dotfiles && sudo nixos-rebuild --show-trace --flake .#$target_hostname switch"
|
||||
store_path=$(nix build --no-link --print-out-paths .#nixosConfigurations."$target_hostname".config.system.build.toplevel)
|
||||
green "Copying generation to $target_hostname"
|
||||
nix copy --to "ssh://root@$target_destination" "$store_path"
|
||||
# prev_system=$($ssh_root_cmd " readlink -e /nix/var/nix/profiles/system")
|
||||
green "Linking generation in bootloader"
|
||||
$ssh_root_cmd "/run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set $store_path"
|
||||
green "Setting generation to activate upon next boot"
|
||||
$ssh_root_cmd "$store_path/bin/switch-to-configuration boot"
|
||||
else
|
||||
echo
|
||||
green "NixOS was successfully installed!"
|
||||
|
|
@ -322,18 +368,24 @@ else
|
|||
echo "To rebuild, sign into $target_hostname and run the following command from ~/nix-config"
|
||||
echo "cd nix-config"
|
||||
# see above FIXME:(bootstrap)
|
||||
echo "sudo nixos-rebuild --show-trace --flake .#$target_hostname switch"
|
||||
echo "sudo nixos-rebuild .pre-commit-config.yaml show-trace --flake .#$target_hostname switch"
|
||||
# echo "just rebuild"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
green "NixOS was successfully installed!"
|
||||
if yes_or_no "You can now commit and push the nix-config, which includes the hardware-configuration.nix for $target_hostname?"; then
|
||||
cd "${git_root}"
|
||||
deadnix hosts/nixos/"$target_hostname"/hardware-configuration.nix -qe
|
||||
nixpkgs-fmt hosts/nixos/"$target_hostname"/hardware-configuration.nix
|
||||
(pre-commit run --all-files 2> /dev/null || true) &&
|
||||
git add "$git_root/hosts/nixos/$target_hostname/hardware-configuration.nix" &&
|
||||
deadnix hosts/nixos/"$target_arch"/"$target_hostname"/hardware-configuration.nix -qe
|
||||
nixpkgs--fmt hosts/nixos/"$target_arch"/"$target_hostname"/hardware-configuration.nix
|
||||
(.pre-commit-config.yaml mit run --all-files 2> /dev/null || true) &&
|
||||
git add "$git_root/hosts/nixos/$target_arch/$target_hostname/hardware-configuration.nix" &&
|
||||
git add "$git_root/.sops.yaml" &&
|
||||
git add "$git_root/secrets" &&
|
||||
(git commit -m "feat: deployed $target_hostname" || true) && git push
|
||||
fi
|
||||
|
||||
if yes_or_no "Reboot now?"; then
|
||||
$ssh_root_cmd "reboot"
|
||||
fi
|
||||
2
files/scripts/swarsel-displaypower.sh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
swaymsg "output * power on" > /dev/null 2>&1 || true
|
||||
swaymsg "output * dpms on" > /dev/null 2>&1 || true
|
||||
|
|
@ -1,23 +1,27 @@
|
|||
set -eo pipefail
|
||||
|
||||
target_config="chaostheatre"
|
||||
target_hostname="chaostheatre"
|
||||
target_config="hotel"
|
||||
target_hostname="hotel"
|
||||
target_user="swarsel"
|
||||
target_arch=""
|
||||
persist_dir=""
|
||||
target_disk="/dev/vda"
|
||||
disk_encryption=0
|
||||
|
||||
function help_and_exit() {
|
||||
echo
|
||||
echo "Locally installs SwarselSystem on this machine."
|
||||
echo
|
||||
echo "USAGE: $0 -n <target_config> [OPTIONS]"
|
||||
echo "USAGE: $0 -n <target_config> -d <target_disk> [OPTIONS]"
|
||||
echo
|
||||
echo "ARGS:"
|
||||
echo " -n <target_config> specify the nixos config to deploy."
|
||||
echo " Default: chaostheatre"
|
||||
echo " Default: chaostheatre"
|
||||
echo " Default: hotel"
|
||||
echo " -d <target_disk> specify disk to install on."
|
||||
echo " Default: /dev/vda"
|
||||
echo " -u <target_user> specify user to deploy for."
|
||||
echo " Default: swarsel"
|
||||
echo " -a <target_arch> specify target architecture."
|
||||
echo " -h | --help Print this help."
|
||||
exit 0
|
||||
}
|
||||
|
|
@ -52,6 +56,14 @@ while [[ $# -gt 0 ]]; do
|
|||
shift
|
||||
target_user=$1
|
||||
;;
|
||||
-d)
|
||||
shift
|
||||
target_disk=$1
|
||||
;;
|
||||
-a)
|
||||
shift
|
||||
target_arch=$1
|
||||
;;
|
||||
-h | --help) help_and_exit ;;
|
||||
*)
|
||||
echo "Invalid option detected."
|
||||
|
|
@ -67,7 +79,12 @@ function cleanup() {
|
|||
}
|
||||
trap cleanup exit
|
||||
|
||||
green "~SwarselSystems~ remote installer"
|
||||
if [[ $target_arch == "" || $target_hostname == "" ]]; then
|
||||
red "error: target_arch or target_hostname not set."
|
||||
help_and_exit
|
||||
fi
|
||||
|
||||
green "~SwarselSystems~ local installer"
|
||||
|
||||
cd /home/"$target_user"
|
||||
|
||||
|
|
@ -78,9 +95,25 @@ sudo rm -rf .dotfiles
|
|||
green "Cloning repository from GitHub"
|
||||
git clone https://github.com/Swarsel/.dotfiles.git
|
||||
|
||||
local_keys=$(ssh-add -L || true)
|
||||
pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/yubikey.pub)
|
||||
read -ra pub_arr <<< "$pub_key"
|
||||
|
||||
cd .dotfiles
|
||||
if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
|
||||
yellow "The ssh key for this configuration is not available."
|
||||
green "Adjusting flake.nix so that the configuration is buildable ..."
|
||||
sed -i '/vbc-nix = {/,/^[[:space:]]*};/d' flake.nix
|
||||
sed -i '/[[:space:]]*\/\/ (inputs.vbc-nix.overlays.default final prev)/d' overlays/default.nix
|
||||
nix flake update vbc-nix
|
||||
git add .
|
||||
else
|
||||
green "Valid SSH key found! Continuing with installation"
|
||||
fi
|
||||
|
||||
green "Reading system information for $target_config ..."
|
||||
DISK="$(nix eval --raw ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.rootDisk)"
|
||||
green "Root Disk: $DISK"
|
||||
green "Root Disk in config: $DISK - Root Disk passed in cli: $target_disk"
|
||||
|
||||
CRYPTED="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isCrypted)"
|
||||
if [[ $CRYPTED == "true" ]]; then
|
||||
|
|
@ -114,20 +147,6 @@ else
|
|||
red "Secure Boot: X"
|
||||
fi
|
||||
|
||||
local_keys=$(ssh-add -L || true)
|
||||
pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/nbl-imba-2.pub)
|
||||
read -ra pub_arr <<< "$pub_key"
|
||||
|
||||
cd .dotfiles
|
||||
if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
|
||||
yellow "The ssh key for this configuration is not available."
|
||||
green "Adjusting flake.nix so that the configuration is buildable"
|
||||
sed -i '/nix-secrets = {/,/^[[:space:]]*};/d' flake.nix
|
||||
git add flake.nix
|
||||
else
|
||||
green "Valid SSH key found! Continuing with installation"
|
||||
fi
|
||||
|
||||
if [ "$disk_encryption" -eq 1 ]; then
|
||||
while true; do
|
||||
green "Set disk encryption passphrase:"
|
||||
|
|
@ -143,21 +162,27 @@ if [ "$disk_encryption" -eq 1 ]; then
|
|||
done
|
||||
fi
|
||||
|
||||
green "Setting up disk"
|
||||
green "Setting up disk ..."
|
||||
if [[ $target_config == "hotel" ]]; then
|
||||
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/v1.10.0 -- --mode destroy,format,mount --flake .#"$target_config" --yes-wipe-all-disks --arg diskDevice "$target_disk"
|
||||
else
|
||||
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount --flake .#"$target_config" --yes-wipe-all-disks
|
||||
fi
|
||||
sudo mkdir -p /mnt/"$persist_dir"/home/"$target_user"/
|
||||
sudo cp -r /home/"$target_user"/.dotfiles /mnt/"$persist_dir"/home/"$target_user"/
|
||||
sudo chown -R 1000:100 /mnt/"$persist_dir"/home/"$target_user"
|
||||
|
||||
green "Generating hardware configuration"
|
||||
sudo nixos-generate-config --root /mnt --no-filesystems --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_config"/
|
||||
green "Generating hardware configuration ..."
|
||||
sudo nixos-generate-config --root /mnt --no-filesystems --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/
|
||||
|
||||
green "Injecting initialSetup"
|
||||
sudo sed -i '/ boot.extraModulePackages /a \ swarselsystems.initialSetup = true;' /home/"$target_user"/.dotfiles/hosts/nixos/"$target_config"/hardware-configuration.nix
|
||||
|
||||
git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_config"/hardware-configuration.nix
|
||||
git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/hardware-configuration.nix
|
||||
sudo mkdir -p /root/.local/share/nix/
|
||||
printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' | sudo tee /root/.local/share/nix/trusted-settings.json > /dev/null
|
||||
green "Installing flake $target_config"
|
||||
sudo nixos-install --flake .#"$target_config"
|
||||
|
||||
store_path=$(nix build --no-link --print-out-paths .#nixosConfigurationsMinimal."$target_config".config.system.build.toplevel)
|
||||
green "Linking generation in bootloader"
|
||||
sudo "/run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set $store_path"
|
||||
green "Setting generation to activate upon next boot"
|
||||
sudo "$store_path/bin/switch-to-configuration boot"
|
||||
green "Installation finished! Reboot to see changes"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
set -eo pipefail
|
||||
|
||||
target_config="chaostheatre"
|
||||
target_config="hotel"
|
||||
target_user="swarsel"
|
||||
|
||||
function help_and_exit() {
|
||||
|
|
@ -12,8 +12,8 @@ function help_and_exit() {
|
|||
echo "ARGS:"
|
||||
echo " -d <disk> specify disk to install on."
|
||||
echo " -n <target_config> specify the nixos config to deploy."
|
||||
echo " Default: chaostheatre"
|
||||
echo " Default: chaostheatre"
|
||||
echo " Default: hotel"
|
||||
echo " Default: hotel"
|
||||
echo " -u <target_user> specify user to deploy for."
|
||||
echo " Default: swarsel"
|
||||
echo " -h | --help Print this help."
|
||||
|
|
@ -68,7 +68,5 @@ if [[ $SECUREBOOT == "true" ]]; then
|
|||
sbctl enroll-keys --ignore-immutable --microsoft || true
|
||||
fi
|
||||
|
||||
green "Disabling initialSetup"
|
||||
sed -i '/swarselsystems\.initialSetup = true;/d' /home/"$target_user"/.dotfiles/hosts/nixos/"$target_config"/hardware-configuration.nix
|
||||
sudo nixos-rebuild --flake .#"$target_config" switch
|
||||
green "Post-install finished!"
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
set -eo pipefail
|
||||
|
||||
target_config="chaostheatre"
|
||||
target_config="hotel"
|
||||
target_arch=""
|
||||
target_user="swarsel"
|
||||
|
||||
function help_and_exit() {
|
||||
|
|
@ -11,9 +12,10 @@ function help_and_exit() {
|
|||
echo
|
||||
echo "ARGS:"
|
||||
echo " -n <target_config> specify nixos config to build."
|
||||
echo " Default: chaostheatre"
|
||||
echo " Default: hotel"
|
||||
echo " -u <target_user> specify user to deploy for."
|
||||
echo " Default: swarsel"
|
||||
echo " -a <target_arch> specify target architecture."
|
||||
echo " -h | --help Print this help."
|
||||
exit 0
|
||||
}
|
||||
|
|
@ -43,6 +45,10 @@ while [[ $# -gt 0 ]]; do
|
|||
shift
|
||||
target_config=$1
|
||||
;;
|
||||
-a)
|
||||
shift
|
||||
target_arch=$1
|
||||
;;
|
||||
-u)
|
||||
shift
|
||||
target_user=$1
|
||||
|
|
@ -56,6 +62,11 @@ while [[ $# -gt 0 ]]; do
|
|||
shift
|
||||
done
|
||||
|
||||
if [[ $target_arch == "" ]]; then
|
||||
red "error: target_arch not set."
|
||||
help_and_exit
|
||||
fi
|
||||
|
||||
cd /home/"$target_user"
|
||||
|
||||
if [ ! -d /home/"$target_user"/.dotfiles ]; then
|
||||
|
|
@ -67,7 +78,7 @@ else
|
|||
fi
|
||||
|
||||
local_keys=$(ssh-add -L || true)
|
||||
pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/nbl-imba-2.pub)
|
||||
pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/yubikey.pub)
|
||||
read -ra pub_arr <<< "$pub_key"
|
||||
|
||||
cd .dotfiles
|
||||
|
|
@ -75,12 +86,24 @@ if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
|
|||
yellow "The ssh key for this configuration is not available."
|
||||
green "Adjusting flake.nix so that the configuration is buildable"
|
||||
sed -i '/nix-secrets = {/,/^[[:space:]]*};/d' flake.nix
|
||||
git add flake.nix
|
||||
sed -i '/vbc-nix = {/,/^[[:space:]]*};/d' flake.nix
|
||||
sed -i '/[[:space:]]*\/\/ (inputs.vbc-nix.overlays.default final prev)/d' overlays/default.nix
|
||||
rm modules/home/common/env.nix
|
||||
rm modules/home/common/gammastep.nix
|
||||
rm modules/home/common/git.nix
|
||||
rm modules/home/common/mail.nix
|
||||
rm modules/home/common/yubikey.nix
|
||||
rm modules/nixos/server/restic.nix
|
||||
rm hosts/nixos/aarch64-linux/milkywell/default.nix
|
||||
rm -rf modules/nixos/server
|
||||
rm -rf modules/home/server
|
||||
nix flake update vbc-nix
|
||||
git add .
|
||||
else
|
||||
green "Valid SSH key found! Continuing with installation"
|
||||
fi
|
||||
sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_config"/
|
||||
git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_config"/hardware-configuration.nix
|
||||
sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/
|
||||
git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/hardware-configuration.nix
|
||||
|
||||
green "Installing flake $target_config"
|
||||
sudo nixos-rebuild --show-trace --flake .#"$target_config" boot
|
||||
36
files/scripts/swarselcheck-niri.sh
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
while :; do
|
||||
case ${1:-} in
|
||||
-k | --kitty)
|
||||
cmd=(sh -c 'kitty --app-id kittyterm -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm' '&')
|
||||
searchapp="kittyterm"
|
||||
;;
|
||||
-e | --element)
|
||||
cmd=(element-desktop)
|
||||
searchapp="Element"
|
||||
;;
|
||||
-d | --vesktop)
|
||||
cmd=(vesktop)
|
||||
searchapp="vesktop"
|
||||
;;
|
||||
-s | --spotifyplayer)
|
||||
cmd=(sh -c 'kitty --add-id spotifytui -T spotifytui -o confirm_os_window_close=0 spotify_player' '&')
|
||||
searchapp="spotifytui"
|
||||
;;
|
||||
*) break ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
WIN_INFO=$(niri msg -j windows | jq --arg search "$searchapp" '.[] | select (.app_id | test($search)) | { id, is_focused, workspace_id }')
|
||||
ID=$(echo "$WIN_INFO" | jq -r '.id // empty')
|
||||
IS_FOCUSED=$(echo "$WIN_INFO" | jq -r '.is_focused // empty')
|
||||
TARGET_MONITOR=$(niri msg -j workspaces | jq --arg search "" '.[] | select (.name != null and (.name | test($search))) | { output }' | jq -r '.output // empty')
|
||||
CURRENT_WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select (.is_active == true) | .output // empty')
|
||||
|
||||
if [ -z "$ID" ]; then
|
||||
niri msg action spawn -- "${cmd[@]}"
|
||||
elif [ "$IS_FOCUSED" ]; then
|
||||
niri msg action move-window-to-workspace "" --window-id "$ID" --focus false
|
||||
else
|
||||
niri msg action focus-monitor "$TARGET_MONITOR" && niri msg action move-window-to-workspace "$CURRENT_WORKSPACE" --window-id "$ID" && niri msg action focus-floating
|
||||
fi
|
||||
|
|
@ -25,7 +25,7 @@ if [[ $kitty -eq 1 ]]; then
|
|||
STR=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.name == "__i3_scratch")' | grep kittyterm || true)
|
||||
CHECK=$(swaymsg -t get_tree | grep kittyterm || true)
|
||||
if [ "$CHECK" == "" ]; then
|
||||
exec kitty -T kittyterm &
|
||||
exec kitty --app-id kittyterm -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm &
|
||||
sleep 1
|
||||
fi
|
||||
if [ "$STR" == "" ]; then
|
||||
|
|
@ -51,7 +51,7 @@ elif [[ $spotifyplayer -eq 1 ]]; then
|
|||
STR=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.name == "__i3_scratch")' | grep spotifytui || true)
|
||||
CHECK=$(swaymsg -t get_tree | grep spotifytui || true)
|
||||
if [ "$CHECK" == "" ]; then
|
||||
exec kitty -T spotifytui -o confirm_os_window_close=0 spotify_player &
|
||||
exec kitty --add-id spotifytui -T spotifytui -o confirm_os_window_close=0 spotify_player &
|
||||
sleep 1
|
||||
fi
|
||||
if [ "$STR" == "" ]; then
|
||||
8
files/scripts/swarselzellij.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# KITTIES=$(($(pgrep -P 1 kitty | wc -l) - 1))
|
||||
|
||||
# if ((KITTIES < 1)); then
|
||||
# exec kitty -o confirm_os_window_close=0 zellij attach --create main
|
||||
# else
|
||||
# exec kitty -o confirm_os_window_close=0 zellij attach --create "temp $KITTIES"
|
||||
# fi
|
||||
exec kitty -o confirm_os_window_close=0 zellij
|
||||
53
files/stylix/swarsel.yaml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# scheme: "better-contrast"
|
||||
author: "Swarsel"
|
||||
author: "Swarsel"
|
||||
base00: "1d252c" #1d252c"
|
||||
base01: "171d23" #171d23"
|
||||
base02: "206a86" #206a86"
|
||||
base03: "003a66" #003a66"
|
||||
base04: "5ec4ff" #5ec4ff"
|
||||
base05: "a0b3c5" #a0b3c5"
|
||||
base06: "7ed4ff" #7ed4ff"
|
||||
base07: "8ef4ff" #8ef4ff"
|
||||
base08: "d95468" #d95468"
|
||||
base09: "ffa880" #ffa880"
|
||||
base0A: "6ed4ff" #6ed4ff"
|
||||
base0B: "8bd49c" #8bd49c"
|
||||
base0C: "008b94" #008b94"
|
||||
base0D: "5ec4ff" #5ec4ff"
|
||||
base0E: "c06ece" #c06ece"
|
||||
base0F: "3c0044" #3c0044"
|
||||
|
||||
# base00: "1D252C" # #1d252c passt
|
||||
# base01: "171D23" # #171d23
|
||||
# base02: "5EC4FF" # #5EC4FF
|
||||
# base03: "566C7D" # #566C7D passt
|
||||
# base04: "5EC4FF" # #5EC4FF passt
|
||||
# base05: "A0B3C5" # #A0B3C5 passt
|
||||
# base06: "C06ECE" # #C06ECE passt
|
||||
# base07: "A0B3C5" # #A0B3C5 passt
|
||||
# base08: "D95468" # #D95468 passt
|
||||
# base09: "FFA880" # #ffA880 passt
|
||||
# base0A: "5EC4FF" # #5EC4FF
|
||||
# base0B: "8BD49C" # #8BD49C
|
||||
# base0C: "008B94" # #008B94 passt
|
||||
# base0D: "5EC4FF" # #5EC4FF passt
|
||||
# base0E: "C06ECE" # #C06ECE passt
|
||||
# base0F: "5EC4FF" # #5EC4FF passt
|
||||
|
||||
# base00 - Default Background
|
||||
# base01 - Lighter Background (Used for status bars)
|
||||
# base02 - Selection Background
|
||||
# base03 - Comments, Invisibles, Line Highlighting
|
||||
# base04 - Dark Foreground (Used for status bars)
|
||||
# base05 - Default Foreground, Caret, Delimiters, Operators
|
||||
# base06 - Light Foreground (Not often used)
|
||||
# base07 - Light Background (Not often used)
|
||||
# base08 - Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
|
||||
# base09 - Integers, Boolean, Constants, XML Attributes, Markup Link Url
|
||||
# base0A - Classes, Markup Bold, Search Text Background
|
||||
# base0B - Strings, Inherited Class, Markup Code, Diff Inserted
|
||||
# base0C - Support, Regular Expressions, Escape Characters, Markup Quotes
|
||||
# base0D - Functions, Methods, Attribute IDs, Headings
|
||||
# base0E - Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||
# base0F - Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>
|
||||
3
files/swayidle/config
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
timeout 300 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2'
|
||||
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
|
||||
before-sleep 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2'
|
||||
1
files/templates/cpp/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
12
files/templates/cpp/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
CMakeUserPresets.json
|
||||
9
files/templates/cpp/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
project(name)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
install(TARGETS name DESTINATION bin)
|
||||
62
files/templates/cpp/flake.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# heavily inspired by https://github.com/nulladmin1/nix-flake-templates/blob/main/cpp-cmake/flake.nix
|
||||
{
|
||||
description = "C++ Flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, systems
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
|
||||
|
||||
pname = "name";
|
||||
in
|
||||
{
|
||||
formatter = forEachSystem (system: pkgsFor.${system}.nixpgks-fmt);
|
||||
|
||||
devShells = forEachSystem (system: {
|
||||
default = pkgsFor.${system}.mkShell {
|
||||
packages = with pkgsFor.${system}; [
|
||||
libllvm
|
||||
cmake
|
||||
gtest
|
||||
cppcheck
|
||||
valgrind
|
||||
doxygen
|
||||
clang-tools
|
||||
# cudatoolkit
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
packages = forEachSystem (system: {
|
||||
default = pkgsFor.${system}.stdenv.mkDerivation {
|
||||
inherit pname;
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = with pkgsFor.${system}; [
|
||||
cmake
|
||||
];
|
||||
buildInputs = with pkgsFor.${system}; [
|
||||
gtest
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
apps = forEachSystem (system: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/${pname}";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
1
files/templates/cpp/src/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
add_executable(name name.cpp name.cpp)
|
||||
7
files/templates/cpp/src/name.cpp
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
cout << "Hello, world!" << endl;
|
||||
return 0;
|
||||
}
|
||||
1
files/templates/default/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
30
files/templates/default/flake.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
description = "General purpose Flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs
|
||||
, systems
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
|
||||
in
|
||||
{
|
||||
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
|
||||
|
||||
devShells = forEachSystem (system: {
|
||||
default = pkgsFor.${system}.mkShell {
|
||||
packages = with pkgsFor.${system}; [
|
||||
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
1
files/templates/go/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
52
files/templates/go/flake.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# heavily inspired by https://github.com/nulladmin1/nix-flake-templates/blob/main/go-nix/flake.nix
|
||||
{
|
||||
description = "Go Flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, systems
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
|
||||
|
||||
pname = "name";
|
||||
in
|
||||
{
|
||||
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
|
||||
|
||||
devShells = forEachSystem (system: {
|
||||
default = pkgsFor.${system}.mkShell {
|
||||
packages = with pkgsFor.${system}; [
|
||||
go
|
||||
gopls
|
||||
go-tools
|
||||
gotools
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
packages = forEachSystem (system: {
|
||||
default = pkgsFor.${system}.buildGoModule {
|
||||
inherit pname;
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
vendorHash = null;
|
||||
};
|
||||
});
|
||||
|
||||
apps = forEachSystem (system: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/${pname}";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
3
files/templates/go/go.mod
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module name
|
||||
|
||||
go 1.22.7
|
||||
9
files/templates/go/name/name.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello, World!")
|
||||
}
|
||||
61
files/templates/hosts/nixos/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ self, config, inputs, pkgs, lib, ... }:
|
||||
let
|
||||
primaryUser = config.swarselsystems.mainUser;
|
||||
modulesPath = "${self}/modules";
|
||||
sharedOptions = {
|
||||
isBtrfs = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
# ---- nixos-hardware here ----
|
||||
|
||||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
|
||||
"${modulesPath}/nixos/optional/virtualbox.nix"
|
||||
# "${modulesPath}/nixos/optional/vmware.nix"
|
||||
"${modulesPath}/nixos/optional/autologin.nix"
|
||||
"${modulesPath}/nixos/optional/nswitch-rcm.nix"
|
||||
"${modulesPath}/nixos/optional/gaming.nix"
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users."${primaryUser}".imports = [
|
||||
"${modulesPath}/home/optional/gaming.nix"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "TEMPLATE";
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
||||
swarselsystems = lib.recursiveUpdate
|
||||
{
|
||||
wallpaper = self + /files/wallpaper/lenovowp.png;
|
||||
hasBluetooth = true;
|
||||
hasFingerprint = true;
|
||||
isImpermanence = true;
|
||||
isSecureBoot = true;
|
||||
isCrypted = true;
|
||||
isSwap = true;
|
||||
swapSize = "32G";
|
||||
rootDisk = "TEMPLATE";
|
||||
}
|
||||
sharedOptions;
|
||||
|
||||
home-manager.users."${primaryUser}".swarselsystems = lib.recursiveUpdate
|
||||
{
|
||||
isLaptop = true;
|
||||
isNixos = true;
|
||||
cpuCount = 16;
|
||||
}
|
||||
sharedOptions;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, config, rootDisk, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-L" "nixos" "-f" ]; # force overwrite
|
||||
1
files/templates/latex/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
292
files/templates/latex/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
# nix build output
|
||||
result
|
||||
|
||||
## PDF output (but not in figures/)
|
||||
*.pdf
|
||||
!figures/*.pdf
|
||||
!figures/**/*.pdf
|
||||
|
||||
## Core latex/pdflatex auxiliary files:
|
||||
*.aux
|
||||
*.lof
|
||||
*.log
|
||||
*.lot
|
||||
*.fls
|
||||
*.out
|
||||
*.toc
|
||||
*.fmt
|
||||
*.fot
|
||||
*.cb
|
||||
*.cb2
|
||||
.*.lb
|
||||
|
||||
## Intermediate documents:
|
||||
*.dvi
|
||||
*.xdv
|
||||
*-converted-to.*
|
||||
# these rules might exclude image files for figures etc.
|
||||
# *.ps
|
||||
# *.eps
|
||||
# *.pdf
|
||||
|
||||
## Generated if empty string is given at "Please type another file name for output:"
|
||||
.pdf
|
||||
|
||||
## Bibliography auxiliary files (bibtex/biblatex/biber):
|
||||
*.bbl
|
||||
*.bcf
|
||||
*.blg
|
||||
*-blx.aux
|
||||
*-blx.bib
|
||||
*.run.xml
|
||||
|
||||
## Build tool auxiliary files:
|
||||
*.fdb_latexmk
|
||||
*.synctex
|
||||
*.synctex(busy)
|
||||
*.synctex.gz
|
||||
*.synctex.gz(busy)
|
||||
*.pdfsync
|
||||
|
||||
## Build tool directories for auxiliary files
|
||||
# latexrun
|
||||
latex.out/
|
||||
|
||||
## Auxiliary and intermediate files from other packages:
|
||||
# algorithms
|
||||
*.alg
|
||||
*.loa
|
||||
|
||||
# achemso
|
||||
acs-*.bib
|
||||
|
||||
# amsthm
|
||||
*.thm
|
||||
|
||||
# beamer
|
||||
*.nav
|
||||
*.pre
|
||||
*.snm
|
||||
*.vrb
|
||||
|
||||
# changes
|
||||
*.soc
|
||||
|
||||
# comment
|
||||
*.cut
|
||||
|
||||
# cprotect
|
||||
*.cpt
|
||||
|
||||
# elsarticle (documentclass of Elsevier journals)
|
||||
*.spl
|
||||
|
||||
# endnotes
|
||||
*.ent
|
||||
|
||||
# fixme
|
||||
*.lox
|
||||
|
||||
# feynmf/feynmp
|
||||
*.mf
|
||||
*.mp
|
||||
*.t[1-9]
|
||||
*.t[1-9][0-9]
|
||||
*.tfm
|
||||
|
||||
#(r)(e)ledmac/(r)(e)ledpar
|
||||
*.end
|
||||
*.?end
|
||||
*.[1-9]
|
||||
*.[1-9][0-9]
|
||||
*.[1-9][0-9][0-9]
|
||||
*.[1-9]R
|
||||
*.[1-9][0-9]R
|
||||
*.[1-9][0-9][0-9]R
|
||||
*.eledsec[1-9]
|
||||
*.eledsec[1-9]R
|
||||
*.eledsec[1-9][0-9]
|
||||
*.eledsec[1-9][0-9]R
|
||||
*.eledsec[1-9][0-9][0-9]
|
||||
*.eledsec[1-9][0-9][0-9]R
|
||||
|
||||
# glossaries
|
||||
*.acn
|
||||
*.acr
|
||||
*.glg
|
||||
*.glo
|
||||
*.gls
|
||||
*.glsdefs
|
||||
*.lzo
|
||||
*.lzs
|
||||
|
||||
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
|
||||
# *.ist
|
||||
|
||||
# gnuplottex
|
||||
*-gnuplottex-*
|
||||
|
||||
# gregoriotex
|
||||
*.gaux
|
||||
*.gtex
|
||||
|
||||
# htlatex
|
||||
*.4ct
|
||||
*.4tc
|
||||
*.idv
|
||||
*.lg
|
||||
*.trc
|
||||
*.xref
|
||||
|
||||
# hyperref
|
||||
*.brf
|
||||
|
||||
# knitr
|
||||
*-concordance.tex
|
||||
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
|
||||
# *.tikz
|
||||
*-tikzDictionary
|
||||
|
||||
# listings
|
||||
*.lol
|
||||
|
||||
# luatexja-ruby
|
||||
*.ltjruby
|
||||
|
||||
# makeidx
|
||||
*.idx
|
||||
*.ilg
|
||||
*.ind
|
||||
|
||||
# minitoc
|
||||
*.maf
|
||||
*.mlf
|
||||
*.mlt
|
||||
*.mtc[0-9]*
|
||||
*.slf[0-9]*
|
||||
*.slt[0-9]*
|
||||
*.stc[0-9]*
|
||||
|
||||
# minted
|
||||
_minted*
|
||||
*.pyg
|
||||
|
||||
# morewrites
|
||||
*.mw
|
||||
|
||||
# nomencl
|
||||
*.nlg
|
||||
*.nlo
|
||||
*.nls
|
||||
|
||||
# pax
|
||||
*.pax
|
||||
|
||||
# pdfpcnotes
|
||||
*.pdfpc
|
||||
|
||||
# sagetex
|
||||
*.sagetex.sage
|
||||
*.sagetex.py
|
||||
*.sagetex.scmd
|
||||
|
||||
# scrwfile
|
||||
*.wrt
|
||||
|
||||
# sympy
|
||||
*.sout
|
||||
*.sympy
|
||||
sympy-plots-for-*.tex/
|
||||
|
||||
# pdfcomment
|
||||
*.upa
|
||||
*.upb
|
||||
|
||||
# pythontex
|
||||
*.pytxcode
|
||||
pythontex-files-*/
|
||||
|
||||
# tcolorbox
|
||||
*.listing
|
||||
|
||||
# thmtools
|
||||
*.loe
|
||||
|
||||
# TikZ & PGF
|
||||
*.dpth
|
||||
*.md5
|
||||
*.auxlock
|
||||
|
||||
# todonotes
|
||||
*.tdo
|
||||
|
||||
# vhistory
|
||||
*.hst
|
||||
*.ver
|
||||
|
||||
# easy-todo
|
||||
*.lod
|
||||
|
||||
# xcolor
|
||||
*.xcp
|
||||
|
||||
# xmpincl
|
||||
*.xmpi
|
||||
|
||||
# xindy
|
||||
*.xdy
|
||||
|
||||
# xypic precompiled matrices and outlines
|
||||
*.xyc
|
||||
*.xyd
|
||||
|
||||
# endfloat
|
||||
*.ttt
|
||||
*.fff
|
||||
|
||||
# Latexian
|
||||
TSWLatexianTemp*
|
||||
|
||||
## Editors:
|
||||
# WinEdt
|
||||
*.bak
|
||||
*.sav
|
||||
|
||||
# Texpad
|
||||
.texpadtmp
|
||||
|
||||
# LyX
|
||||
*.lyx~
|
||||
|
||||
# Kile
|
||||
*.backup
|
||||
|
||||
# gummi
|
||||
.*.swp
|
||||
|
||||
# KBibTeX
|
||||
*~[0-9]*
|
||||
|
||||
# TeXnicCenter
|
||||
*.tps
|
||||
|
||||
# auto folder when using emacs and auctex
|
||||
./auto/*
|
||||
*.el
|
||||
|
||||
# expex forward references with \gathertags
|
||||
*-tags.tex
|
||||
|
||||
# standalone packages
|
||||
*.sta
|
||||
|
||||
# Makeindex log files
|
||||
*.lpz
|
||||
|
||||
# xwatermark package
|
||||
*.xwm
|
||||
|
||||
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
|
||||
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
|
||||
# Uncomment the next line to have this generated file ignored.
|
||||
#*Notes.bib
|
||||
3
files/templates/latex/.latexmkrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$pdf_mode = 4;
|
||||
@default_files = ('000-main.tex');
|
||||
$lualatex = "lualatex %O -shell-escape %S";
|
||||
75
files/templates/latex/000-main.tex
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
%! TEX root = **/000-main.tex
|
||||
% vim: spell spelllang=en:
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% PREAMBLE
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\input{001-preamble}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% EXTRA PACKAGES / CONFIG
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% METADATA
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% remove when using \maketitle:
|
||||
\renewcommand\and{\\[\baselineskip]}
|
||||
|
||||
\title{My title \\ \Large \normalfont My Subtitle}
|
||||
\author{First Author \and Second Author}
|
||||
\date{\today}
|
||||
|
||||
\begin{document}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% TITLE
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Default title or use titlepage.tex
|
||||
|
||||
%\maketitle
|
||||
\include{005-titlepage}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% TOC & lists
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\pagenumbering{Roman}
|
||||
|
||||
%\setcounter{tocdepth}{2}
|
||||
\tableofcontents \pagebreak
|
||||
|
||||
\listoffigures \pagebreak
|
||||
\listoftables \clearpage
|
||||
|
||||
\pagenumbering{arabic}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% SECTIONS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Paragraph spacing (placed after ToC)
|
||||
\setlength{\parskip}{1em plus 0.5em minus 0.2em}
|
||||
%\setlength{\parindent}{0pt}
|
||||
|
||||
\include{010-introduction}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% BIBLIO
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\printbibliography[heading=bibintoc]
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% APPENDIX
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% uncomment to add appendix section prefix to numbering
|
||||
%\appendixpagenumbering
|
||||
|
||||
\appendix
|
||||
|
||||
\include{990-appendix}
|
||||
|
||||
\end{document}
|
||||
204
files/templates/latex/001-preamble.tex
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
%! TEX root = **/000-main.tex
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% LaTeX preamble, load in main.tex with: \input{preamble}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\documentclass[12pt, oneside]{article}
|
||||
\usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
|
||||
|
||||
% for debugging overfulls
|
||||
%\documentclass[draft, 12pt, oneside]{article}
|
||||
%\usepackage[showframe, a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% FONTS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{fontspec}
|
||||
\usepackage{microtype}
|
||||
|
||||
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% LANGUAGE
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\usepackage{polyglossia}
|
||||
\setdefaultlanguage{english}
|
||||
\setotherlanguages{spanish,catalan}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% BIBLIOGRAPHY
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\usepackage[
|
||||
backend=biber,
|
||||
style=numeric,
|
||||
]{biblatex}
|
||||
\DeclareNameAlias{default}{family-given}
|
||||
|
||||
\addbibresource{biblio.bib}
|
||||
|
||||
\usepackage{fvextra} % Req by minted (must load before csquotes)
|
||||
\usepackage{csquotes} % For bibliography quotations
|
||||
\DeclareQuoteAlias{spanish}{catalan}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% COMMON
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\usepackage{color, xcolor} % more colors
|
||||
|
||||
\usepackage{graphicx} % graphics
|
||||
\graphicspath{{./figures/}}
|
||||
|
||||
\usepackage{comment}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% MATHS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\usepackage{mathtools} % amsmath + more
|
||||
\usepackage{amsthm} % Theorem enviroment
|
||||
\usepackage{amssymb} % More symbols
|
||||
\usepackage{amstext} % Text inside mathenv
|
||||
|
||||
%\usepackage{relsize} % Bigger math with mathlarger{___}
|
||||
%\usepackage{nicefrac} % nice fractions in one line
|
||||
|
||||
%\usepackage{IEEEtrantools} % Complex equation arrays
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% REFERENCES (load order is important)
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\usepackage{varioref} % reference far away (1)
|
||||
\usepackage[colorlinks = true]{hyperref} % links in references (2)
|
||||
\usepackage{cleveref} % smart references (3)
|
||||
%hyperref configuration so that it doesn't contrast so much colorlinks,
|
||||
\hypersetup{
|
||||
linkcolor={black},
|
||||
citecolor={black},
|
||||
%linkcolor={red!50!black},
|
||||
%citecolor={blue!50!black},
|
||||
urlcolor={blue!80!black}
|
||||
}
|
||||
|
||||
\usepackage[bottom]{footmisc} % Footnotes at bottom of page
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% FIGURES
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%\usepackage[export]{adjustbox} % Adjust table size
|
||||
\usepackage{float} % Force tables and images position (H and H!)
|
||||
%\usepackage{wrapfig} % Wrap images like in HTML
|
||||
|
||||
\usepackage[justification=centering]{caption}
|
||||
%\usepackage{subcaption} % Subfigures
|
||||
%\usepackage[framemethod=tikz]{mdframed} % Custom frames
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% TABLES
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%\usepackage{colortbl, booktabs} % Better tables
|
||||
%\usepackage{tabularx}
|
||||
%\usepackage{longtable} % Multiple page table (does not work with tabularx)
|
||||
\usepackage{xltabular, colortbl, booktabs} % longtable + tabularx (has bug with booktabs: fix below)
|
||||
|
||||
% Split cell in lines and more formating options inside table
|
||||
\usepackage{array, multirow, multicol, makecell}
|
||||
|
||||
%%%
|
||||
% bug fix for booktabs + xltabular incompatibility
|
||||
\makeatletter
|
||||
\def\@BTrule[#1]{%
|
||||
\ifx\longtable\undefined
|
||||
\let\@BTswitch\@BTnormal
|
||||
\else\ifx\hline\LT@hline
|
||||
\nobreak
|
||||
\let\@BTswitch\@BLTrule
|
||||
\else
|
||||
\let\@BTswitch\@BTnormal
|
||||
\fi\fi
|
||||
\global\@thisrulewidth=#1\relax
|
||||
\ifnum\@thisruleclass=\tw@\vskip\@aboverulesep\else
|
||||
\ifnum\@lastruleclass=\z@\vskip\@aboverulesep\else
|
||||
\ifnum\@lastruleclass=\@ne\vskip\doublerulesep\fi\fi\fi
|
||||
\@BTswitch}
|
||||
\makeatother
|
||||
%%%
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% SIUNITX
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%\usepackage[alsoload=hep]{siunitx} % SI units and uncertainties
|
||||
%\sisetup{locale = FR} % Commas and so on for spanish
|
||||
%\sisetup{separate-uncertainty=true}
|
||||
%\sisetup{
|
||||
%per-mode=fraction,
|
||||
%fraction-function=\nicefrac
|
||||
%}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% TIKZ
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%\usepackage{tikz}
|
||||
%\usetikzlibrary{arrows}
|
||||
%\usetikzlibrary{scopes}
|
||||
%\usetikzlibrary{babel}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% MINTED
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\usepackage{minted}
|
||||
\definecolor{codeBg}{HTML}{FFFDE7}
|
||||
\setminted{
|
||||
%style=pastie,
|
||||
frame=lines,
|
||||
framesep=3mm,
|
||||
linenos,
|
||||
breaklines=true,
|
||||
encoding=utf8,
|
||||
fontsize=\footnotesize,
|
||||
bgcolor=codeBg
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% CUSTOM COMMANDS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% empty whitepage without numbering
|
||||
\newcommand{\whitepage}{
|
||||
\clearpage\thispagestyle{empty}\addtocounter{page}{-1} \newpage \clearpage
|
||||
}
|
||||
|
||||
% Add command before appendix section for page numbering: A-1
|
||||
\newcommand{\appendixpagenumbering}{
|
||||
\break
|
||||
\pagenumbering{arabic}
|
||||
\renewcommand{\thepage}{\thesection-\arabic{page}}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% CUSTOM MATH OPERATORS (functions not in italic in math mode)
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%\DeclareMathOperator{\arcsec}{arcsec}
|
||||
%\DeclareMathOperator{\arccot}{arccot}
|
||||
%\DeclareMathOperator{\arccsc}{arccsc}
|
||||
%\DeclareMathOperator{\cis}{cis}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% MISC
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%\usepackage{datetime} % Customize date
|
||||
%% \monthyeardate\today gives the date without the day
|
||||
%\newdateformat{monthyeardate}{%
|
||||
%\monthname[\THEMONTH], \THEYEAR}
|
||||
28
files/templates/latex/005-titlepage.tex
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
%! TEX root = **/000-main.tex
|
||||
% vim: spell spelllang=en:
|
||||
|
||||
\thispagestyle{empty}
|
||||
\clearpage
|
||||
\setcounter{page}{-1}
|
||||
|
||||
\makeatletter
|
||||
\begin{titlepage}
|
||||
{
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{institution-logo}
|
||||
\null%
|
||||
\vspace{3em}
|
||||
{\Huge \bfseries \@title \par}
|
||||
\vspace{2em}
|
||||
{\large \scshape \@date \par}
|
||||
\vfill
|
||||
\begin{center}
|
||||
% Supplementary image
|
||||
\end{center}
|
||||
\vspace{5em}
|
||||
|
||||
\vfill
|
||||
{\raggedleft \large \@author \par}
|
||||
}
|
||||
\end{titlepage}
|
||||
\makeatother
|
||||
39
files/templates/latex/010-introduction.tex
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
%! TEX root = **/000-main.tex
|
||||
% vim: spell spelllang=en:
|
||||
|
||||
\section{Introduction}%
|
||||
\label{sec:introduction}
|
||||
|
||||
\(E = mc^2\) \cite{einstein}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=0.3\linewidth]{Professortocat_v2}
|
||||
\caption{Professor OctoCat}%
|
||||
\label{fig:profocto}
|
||||
\end{figure}
|
||||
|
||||
As we can see in \cref{fig:profocto}, the professor is holding an apple.
|
||||
|
||||
\begin{table}[H]
|
||||
\begin{center}
|
||||
\caption{Table captions go on top of the tables}%
|
||||
\label{tab:example}
|
||||
\begin{tabular}{ccc}
|
||||
\toprule
|
||||
a & b & c \\
|
||||
\midrule
|
||||
0 & 2 & 4 \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
\end{table}
|
||||
|
||||
\subsection{Lorem ipsum}%
|
||||
\label{sub:lorem_ipsum}
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ultricies est sit amet interdum ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut nulla lectus, bibendum ultrices dui quis, sodales suscipit quam. Donec eu finibus lectus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam eu metus mattis, bibendum massa quis, eleifend libero. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc lacinia ipsum at dolor tristique convallis. Sed dignissim malesuada nunc, nec malesuada risus sagittis eu. Nulla et erat et mi elementum scelerisque vitae at neque. Suspendisse scelerisque laoreet tellus, sit amet accumsan mauris placerat nec. Vestibulum mollis augue a odio posuere, ut gravida est lacinia. Etiam turpis ligula, molestie nec porta in, malesuada id magna. Donec elementum nulla ac tincidunt fringilla. Suspendisse porta laoreet nisl, non aliquam orci dictum egestas.
|
||||
|
||||
Proin euismod consequat felis ut pharetra. Maecenas auctor, nunc ac gravida pretium, metus mi fringilla lectus, auctor scelerisque nunc velit id magna. Etiam sit amet mi sit amet nunc congue ornare non hendrerit diam. Nullam consectetur lectus quis urna vehicula, nec lacinia tortor rhoncus. Vestibulum at enim aliquam, ultricies urna sit amet, porta tellus. Curabitur posuere elit orci, et rutrum nibh cursus eget. Donec ac venenatis purus. Fusce vehicula nisi erat, at tempor turpis congue vitae. Nunc auctor pellentesque malesuada. Nunc sodales, dolor ac sagittis mollis, enim ipsum mollis sem, non porttitor arcu nulla at velit. Ut non velit nec lacus sollicitudin maximus id id tortor. Sed ac aliquam lorem.
|
||||
|
||||
Nunc non ante ex. Curabitur lacinia euismod velit, non posuere leo bibendum non. Mauris ac orci non risus feugiat rutrum eu ac velit. Phasellus facilisis lacinia condimentum. Pellentesque vulputate nibh urna, vel varius mauris cursus quis. Aliquam vitae sem ac orci fermentum semper. Praesent est tellus, luctus sed venenatis at, bibendum id purus. Cras at mi sed lorem aliquet congue at sit amet turpis. Aliquam vestibulum tempor mauris, id aliquam ipsum scelerisque ut. In arcu turpis, dapibus ut nisi vel, luctus pellentesque felis. Aenean nisi erat, porttitor eu felis ut, imperdiet aliquam velit. Mauris vitae vehicula leo. Curabitur ut ante et ante pulvinar gravida. Donec tincidunt fringilla erat. Vivamus cursus augue et odio pharetra hendrerit.
|
||||
8
files/templates/latex/990-appendix.tex
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
%! TEX root = **/000-main.tex
|
||||
% vim: spell spelllang=en:
|
||||
|
||||
\section{Appendix}
|
||||
|
||||
Appendix contents
|
||||
|
||||
\inputminted{cpp}{./code/P15601_en_Harrichu_y_and_the_maze.cc}
|
||||
41
files/templates/latex/biblio.bib
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
% vim: spell spelllang=en:
|
||||
|
||||
@article{einstein,
|
||||
author = "Albert Einstein",
|
||||
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
|
||||
[{On} the electrodynamics of moving bodies]",
|
||||
journal = "Annalen der Physik",
|
||||
volume = "322",
|
||||
number = "10",
|
||||
pages = "891--921",
|
||||
year = "1905",
|
||||
DOI = "http://dx.doi.org/10.1002/andp.19053221004",
|
||||
keywords = "physics"
|
||||
}
|
||||
|
||||
@book{dirac,
|
||||
title = {The Principles of Quantum Mechanics},
|
||||
author = {Paul Adrien Maurice Dirac},
|
||||
isbn = {9780198520115},
|
||||
series = {International series of monographs on physics},
|
||||
year = {1981},
|
||||
publisher = {Clarendon Press},
|
||||
keywords = {physics}
|
||||
}
|
||||
|
||||
@online{knuthwebsite,
|
||||
author = "Donald Knuth",
|
||||
title = "Knuth: Computers and Typesetting",
|
||||
url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
|
||||
addendum = "(accessed: 01.09.2016)",
|
||||
keywords = "latex,knuth"
|
||||
}
|
||||
|
||||
@inbook{knuth-fa,
|
||||
author = "Donald E. Knuth",
|
||||
title = "Fundamental Algorithms",
|
||||
publisher = "Addison-Wesley",
|
||||
year = "1973",
|
||||
chapter = "1.2",
|
||||
keywords = "knuth,programming"
|
||||
}
|
||||
87
files/templates/latex/build-document.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
# Build a reproducible latex document with latexmk, based on:
|
||||
# https://flyx.org/nix-flakes-latex/
|
||||
|
||||
{ pkgs
|
||||
# Document source
|
||||
, src ? ./.
|
||||
|
||||
# Name of the final pdf file
|
||||
, name ? "document.pdf"
|
||||
|
||||
# Use -shell-escape
|
||||
, shellEscape ? false
|
||||
|
||||
# Use minted (requires shellEscape)
|
||||
, minted ? false
|
||||
|
||||
# Additional flags for latexmk
|
||||
, extraFlags ? [ ]
|
||||
|
||||
# Do not use the default latexmk flags. Usefull if you have a .latexmkrc or you
|
||||
# don't want to use lualatex
|
||||
, dontUseDefaultFlags ? false
|
||||
|
||||
# texlive packages needed to build the document
|
||||
# you can also include other packages as a list.
|
||||
, texlive ? pkgs.texlive.combined.scheme-full
|
||||
|
||||
# Pygments package to use (needed for minted)
|
||||
, pygments ? pkgs.python39Packages.pygments
|
||||
|
||||
# Add system fonts
|
||||
# you can specify one font directly with: pkgs.fira-code
|
||||
# of join multiple fonts using symlinJoin:
|
||||
# pkgs.symlinkJoin { name = "fonts"; paths = with pkgs; [ fira-code souce-code-pro ]; }
|
||||
, fonts ? null
|
||||
|
||||
# Date for the document in unix time. You can change it
|
||||
# to "$(date -r . +%s)" , "$(date -d "2022/02/22" +%s)", toString
|
||||
# self.lastModified
|
||||
, SOURCE_DATE_EPOCH ? "$(git log -1 --pretty=%ct)"
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
defaultFlags = [
|
||||
"-interaction=nonstopmode"
|
||||
"-pdf"
|
||||
"-lualatex"
|
||||
"-pretex='\\pdfvariable suppressoptionalinfo 512\\relax'"
|
||||
"-usepretex"
|
||||
];
|
||||
flags = lib.concatLists [
|
||||
(lib.optional (!dontUseDefaultFlags) defaultFlags)
|
||||
extraFlags
|
||||
(lib.optional shellEscape [ "-shell-escape" ])
|
||||
];
|
||||
in
|
||||
|
||||
assert minted -> shellEscape;
|
||||
|
||||
pkgs.stdenvNoCC.mkDerivation rec {
|
||||
inherit src name;
|
||||
|
||||
buildInputs = [ texlive pkgs.git ] ++
|
||||
lib.optional minted [ pkgs.which pygments ];
|
||||
|
||||
TEXMFHOME = "./cache";
|
||||
TEXMFVAR = "./cache/var";
|
||||
|
||||
OSFONTDIR = lib.optionalString (fonts != null) "${fonts}/share/fonts";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH}" latexmk ${toString flags}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -m644 -D *.pdf $out/${name}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#include <iostream>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
struct coord {
|
||||
int x,y;
|
||||
coord (int xx=0, int yy=0) : x(xx), y(yy) {}
|
||||
bool operator== (const coord& p) {return x==p.x and y==p.y;}
|
||||
} beg, goal;
|
||||
|
||||
int main () {
|
||||
int n;
|
||||
cin >> n;
|
||||
while (n--) {
|
||||
int r,c;
|
||||
cin >> r >> c;
|
||||
vector <vector <bool> > v (r, vector <bool> (c, 0));
|
||||
for (int i = 0; i < r; ++i)
|
||||
for (int j = 0; j < c; ++j) {
|
||||
char cc;
|
||||
cin >> cc;
|
||||
if (cc=='.') v[i][j]=true;
|
||||
else if (cc=='b') beg = coord(i,j);
|
||||
else if (cc=='g') goal = coord(i,j);
|
||||
}
|
||||
|
||||
v[goal.x][goal.y] = v[beg.x][beg.y]=true;
|
||||
vector <vector <bool> > f (v.size(),vector <bool> (v[0].size(),0));
|
||||
|
||||
queue <coord> q;
|
||||
q.push(beg);
|
||||
|
||||
while (!q.empty()) {
|
||||
coord p = q.front(); q.pop();
|
||||
if (p.x>=v.size() or p.x<0 or p.y >= v[0].size() or p.y<0) continue;
|
||||
if (!v[p.x][p.y]) continue;
|
||||
if (f[p.x][p.y]) continue;
|
||||
|
||||
f[p.x][p.y] = true;
|
||||
if (p==goal) break;
|
||||
|
||||
q.push(coord(p.x+1,p.y));
|
||||
q.push(coord(p.x-1,p.y));
|
||||
q.push(coord(p.x,p.y+1));
|
||||
q.push(coord(p.x,p.y-1));
|
||||
}
|
||||
|
||||
cout << (f[goal.x][goal.y]? "Good" : "Bad") << endl;
|
||||
}
|
||||
}
|
||||
BIN
files/templates/latex/figures/Professortocat_v2.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
files/templates/latex/figures/institution-logo.pdf
Normal file
78
files/templates/latex/flake.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# This template is based on https://github.com/Leixb/latex-template/tree/master
|
||||
{
|
||||
description = "LaTeX Flake";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
{
|
||||
|
||||
lib.latexmk = import ./build-document.nix;
|
||||
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pname = "document";
|
||||
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
latex-packages = with pkgs; [
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-medium
|
||||
framed
|
||||
titlesec
|
||||
cleveref
|
||||
multirow
|
||||
wrapfig
|
||||
tabu
|
||||
threeparttable
|
||||
threeparttablex
|
||||
makecell
|
||||
environ
|
||||
biblatex
|
||||
biber
|
||||
fvextra
|
||||
upquote
|
||||
catchfile
|
||||
xstring
|
||||
csquotes
|
||||
minted
|
||||
dejavu
|
||||
comment
|
||||
footmisc
|
||||
xltabular
|
||||
ltablex
|
||||
;
|
||||
})
|
||||
which
|
||||
python39Packages.pygments
|
||||
];
|
||||
|
||||
dev-packages = with pkgs; [
|
||||
texlab
|
||||
zathura
|
||||
wmctrl
|
||||
];
|
||||
in
|
||||
rec {
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = [ latex-packages dev-packages ];
|
||||
};
|
||||
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
||||
packages = flake-utils.lib.flattenTree {
|
||||
default = import ./build-document.nix {
|
||||
inherit pkgs;
|
||||
name = pname;
|
||||
texlive = latex-packages;
|
||||
shellEscape = true;
|
||||
minted = true;
|
||||
SOURCE_DATE_EPOCH = toString self.lastModified;
|
||||
};
|
||||
};
|
||||
|
||||
apps.default = flake-utils.lib.mkApp { drv = "${pkgs.texlivePackages.latexmk}"; exePath = "/bin/latexmk"; };
|
||||
}
|
||||
);
|
||||
}
|
||||
1
files/templates/python/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
1
files/templates/python/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
__pycache__
|
||||
26
files/templates/python/README.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Python template using uv2nix
|
||||
|
||||
This template flake provides a python environment that is being managed by `uv` while still keeping the store managed by `nix`.
|
||||
|
||||
## Setup
|
||||
|
||||
1) Enter project directory
|
||||
2) `project python`
|
||||
3) Edit Python version in `flake.nix` and Python version + dependencies in `pyproject.toml`
|
||||
4) `uv lock`
|
||||
5) `direnv reload`
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
|
||||
### Testing
|
||||
|
||||
- run `nix flake check`
|
||||
|
||||
###### Note for Emacs users
|
||||
|
||||
It can happen that Emacs will not immediately pick up on the new environment after you have made your changes. In that case, perform the following steps in Emacs (this is for a setup using `envrc.el` and `eglot`):
|
||||
|
||||
1) `(envrc-reload)`
|
||||
2) `(eglot)`
|
||||
199
files/templates/python/flake.nix
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
# based on https://github.com/pyproject-nix/uv2nix/tree/master/templates/hello-world
|
||||
{
|
||||
description = "Python flake using uv2nix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
pyproject-nix = {
|
||||
url = "github:pyproject-nix/pyproject.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
uv2nix = {
|
||||
url = "github:pyproject-nix/uv2nix";
|
||||
inputs = {
|
||||
pyproject-nix.follows = "pyproject-nix";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
pyproject-build-systems = {
|
||||
url = "github:pyproject-nix/build-system-pkgs";
|
||||
inputs = {
|
||||
pyproject-nix.follows = "pyproject-nix";
|
||||
uv2nix.follows = "uv2nix";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs
|
||||
, uv2nix
|
||||
, pyproject-nix
|
||||
, pyproject-build-systems
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
pname = "name";
|
||||
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
||||
|
||||
# Load a uv workspace from a workspace root.
|
||||
# Uv2nix treats all uv projects as workspace projects.
|
||||
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
|
||||
|
||||
overlay = workspace.mkPyprojectOverlay {
|
||||
# Prefer prebuilt binary wheels as a package source.
|
||||
# Sdists are less likely to "just work" because of the metadata missing from uv.lock.
|
||||
# Binary wheels are more likely to, but may still require overrides for library dependencies.
|
||||
sourcePreference = "wheel"; # or sourcePreference = "sdist";
|
||||
# Optionally customise PEP 508 environment
|
||||
# environ = {
|
||||
# platform_release = "5.10.65";
|
||||
# };
|
||||
};
|
||||
|
||||
|
||||
pythonSets = forAllSystems
|
||||
(system:
|
||||
let
|
||||
inherit (pkgs) stdenv;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pyprojectOverrides = final: prev: {
|
||||
# Implement build fixups here.
|
||||
${pname} = prev.${pname}.overrideAttrs (old: {
|
||||
|
||||
passthru = old.passthru // {
|
||||
# Put all tests in the passthru.tests attribute set.
|
||||
# Nixpkgs also uses the passthru.tests mechanism for ofborg test discovery.
|
||||
#
|
||||
# For usage with Flakes we will refer to the passthru.tests attributes to construct the flake checks attribute set.
|
||||
tests =
|
||||
let
|
||||
|
||||
virtualenv = final.mkVirtualEnv "${pname}-pytest-env" {
|
||||
${pname} = [ "test" ];
|
||||
};
|
||||
|
||||
in
|
||||
(old.tests or { })
|
||||
// {
|
||||
pytest = stdenv.mkDerivation {
|
||||
name = "${final.${pname}.name}-pytest";
|
||||
inherit (final.${pname}) src;
|
||||
nativeBuildInputs = [
|
||||
virtualenv
|
||||
];
|
||||
dontConfigure = true;
|
||||
|
||||
# Because this package is running tests, and not actually building the main package
|
||||
# the build phase is running the tests.
|
||||
#
|
||||
# We also output a HTML coverage report, which is used as the build output.
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
pytest --cov tests --cov-report html
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# Install the HTML coverage report into the build output.
|
||||
#
|
||||
# If you wanted to install multiple test output formats such as TAP outputs
|
||||
# you could make this derivation a multiple-output derivation.
|
||||
#
|
||||
# See https://nixos.org/manual/nixpkgs/stable/#chap-multiple-output for more information on multiple outputs.
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mv htmlcov $out
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
baseSet = pkgs.callPackage pyproject-nix.build.packages {
|
||||
python = pkgs.python312;
|
||||
};
|
||||
in
|
||||
baseSet.overrideScope
|
||||
(
|
||||
lib.composeManyExtensions [
|
||||
pyproject-build-systems.overlays.default
|
||||
overlay
|
||||
pyprojectOverrides
|
||||
]
|
||||
));
|
||||
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pythonSet = pythonSets.${system};
|
||||
in
|
||||
{ default = pythonSet.mkVirtualEnv "${pname}-env" workspace.deps.default; });
|
||||
|
||||
devShells = forAllSystems
|
||||
(system:
|
||||
let
|
||||
pythonSet = pythonSets.${system};
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
default =
|
||||
let
|
||||
# Create an overlay enabling editable mode for all local dependencies.
|
||||
editableOverlay = workspace.mkEditablePyprojectOverlay {
|
||||
# Use environment variable
|
||||
root = "$REPO_ROOT";
|
||||
# Optional: Only enable editable for these packages
|
||||
# members = [ "hello-world" ];
|
||||
};
|
||||
|
||||
# Override previous set with our overrideable overlay.
|
||||
editablePythonSet = pythonSet.overrideScope editableOverlay;
|
||||
|
||||
virtualenv = editablePythonSet.mkVirtualEnv "${pname}-dev-env" {
|
||||
${pname} = [ "dev" ];
|
||||
};
|
||||
|
||||
in
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
virtualenv
|
||||
pkgs.uv
|
||||
];
|
||||
shellHook = ''
|
||||
# Undo dependency propagation by nixpkgs.
|
||||
unset PYTHONPATH
|
||||
|
||||
# Don't create venv using uv
|
||||
export UV_NO_SYNC=1
|
||||
|
||||
# Prevent uv from downloading managed Python's
|
||||
export UV_PYTHON_DOWNLOADS=never
|
||||
|
||||
# Get repository root using git. This is expanded at runtime by the editable `.pth` machinery.
|
||||
export REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
'';
|
||||
};
|
||||
});
|
||||
|
||||
checks = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pythonSet = pythonSets.${system};
|
||||
in
|
||||
{
|
||||
inherit (pythonSet.${pname}.passthru.tests) pytest;
|
||||
}
|
||||
);
|
||||
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
||||
|
||||
};
|
||||
}
|
||||
32
files/templates/python/pyproject.toml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[project]
|
||||
name = "name"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
hello = "name:hello"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
{include-group = "test"},
|
||||
{include-group = "lint"},
|
||||
{include-group = "lsp"},
|
||||
]
|
||||
lsp = [
|
||||
"python-lsp-server",
|
||||
]
|
||||
lint = [
|
||||
"ruff>=0.6.7",
|
||||
]
|
||||
test = [
|
||||
"pytest-cov>=6.0.0",
|
||||
"pytest>=8.3.3",
|
||||
]
|
||||
2
files/templates/python/src/name/__init__.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
def hello() -> None:
|
||||
print("Hello from testing!")
|
||||
8
files/templates/python/tests/test_hello.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import name
|
||||
|
||||
|
||||
def test_hello(capsys):
|
||||
name.hello()
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == "Hello from testing!\n"
|
||||
assert captured.err == ""
|
||||
254
files/templates/python/uv.lock
generated
Normal file
|
|
@ -0,0 +1,254 @@
|
|||
version = 1
|
||||
requires-python = ">=3.12"
|
||||
|
||||
[[package]]
|
||||
name = "colorama"
|
||||
version = "0.4.6"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coverage"
|
||||
version = "7.6.10"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/84/ba/ac14d281f80aab516275012e8875991bb06203957aa1e19950139238d658/coverage-7.6.10.tar.gz", hash = "sha256:7fb105327c8f8f0682e29843e2ff96af9dcbe5bab8eeb4b398c6a33a16d80a23", size = 803868 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/86/77/19d09ea06f92fdf0487499283b1b7af06bc422ea94534c8fe3a4cd023641/coverage-7.6.10-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:27c6e64726b307782fa5cbe531e7647aee385a29b2107cd87ba7c0105a5d3853", size = 208281 },
|
||||
{ url = "https://files.pythonhosted.org/packages/b6/67/5479b9f2f99fcfb49c0d5cf61912a5255ef80b6e80a3cddba39c38146cf4/coverage-7.6.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c56e097019e72c373bae32d946ecf9858fda841e48d82df7e81c63ac25554078", size = 208514 },
|
||||
{ url = "https://files.pythonhosted.org/packages/15/d1/febf59030ce1c83b7331c3546d7317e5120c5966471727aa7ac157729c4b/coverage-7.6.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7827a5bc7bdb197b9e066cdf650b2887597ad124dd99777332776f7b7c7d0d0", size = 241537 },
|
||||
{ url = "https://files.pythonhosted.org/packages/4b/7e/5ac4c90192130e7cf8b63153fe620c8bfd9068f89a6d9b5f26f1550f7a26/coverage-7.6.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:204a8238afe787323a8b47d8be4df89772d5c1e4651b9ffa808552bdf20e1d50", size = 238572 },
|
||||
{ url = "https://files.pythonhosted.org/packages/dc/03/0334a79b26ecf59958f2fe9dd1f5ab3e2f88db876f5071933de39af09647/coverage-7.6.10-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67926f51821b8e9deb6426ff3164870976fe414d033ad90ea75e7ed0c2e5022", size = 240639 },
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/45/8a707f23c202208d7b286d78ad6233f50dcf929319b664b6cc18a03c1aae/coverage-7.6.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e78b270eadb5702938c3dbe9367f878249b5ef9a2fcc5360ac7bff694310d17b", size = 240072 },
|
||||
{ url = "https://files.pythonhosted.org/packages/66/02/603ce0ac2d02bc7b393279ef618940b4a0535b0868ee791140bda9ecfa40/coverage-7.6.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:714f942b9c15c3a7a5fe6876ce30af831c2ad4ce902410b7466b662358c852c0", size = 238386 },
|
||||
{ url = "https://files.pythonhosted.org/packages/04/62/4e6887e9be060f5d18f1dd58c2838b2d9646faf353232dec4e2d4b1c8644/coverage-7.6.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:abb02e2f5a3187b2ac4cd46b8ced85a0858230b577ccb2c62c81482ca7d18852", size = 240054 },
|
||||
{ url = "https://files.pythonhosted.org/packages/5c/74/83ae4151c170d8bd071924f212add22a0e62a7fe2b149edf016aeecad17c/coverage-7.6.10-cp312-cp312-win32.whl", hash = "sha256:55b201b97286cf61f5e76063f9e2a1d8d2972fc2fcfd2c1272530172fd28c359", size = 210904 },
|
||||
{ url = "https://files.pythonhosted.org/packages/c3/54/de0893186a221478f5880283119fc40483bc460b27c4c71d1b8bba3474b9/coverage-7.6.10-cp312-cp312-win_amd64.whl", hash = "sha256:e4ae5ac5e0d1e4edfc9b4b57b4cbecd5bc266a6915c500f358817a8496739247", size = 211692 },
|
||||
{ url = "https://files.pythonhosted.org/packages/25/6d/31883d78865529257bf847df5789e2ae80e99de8a460c3453dbfbe0db069/coverage-7.6.10-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:05fca8ba6a87aabdd2d30d0b6c838b50510b56cdcfc604d40760dae7153b73d9", size = 208308 },
|
||||
{ url = "https://files.pythonhosted.org/packages/70/22/3f2b129cc08de00c83b0ad6252e034320946abfc3e4235c009e57cfeee05/coverage-7.6.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9e80eba8801c386f72e0712a0453431259c45c3249f0009aff537a517b52942b", size = 208565 },
|
||||
{ url = "https://files.pythonhosted.org/packages/97/0a/d89bc2d1cc61d3a8dfe9e9d75217b2be85f6c73ebf1b9e3c2f4e797f4531/coverage-7.6.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a372c89c939d57abe09e08c0578c1d212e7a678135d53aa16eec4430adc5e690", size = 241083 },
|
||||
{ url = "https://files.pythonhosted.org/packages/4c/81/6d64b88a00c7a7aaed3a657b8eaa0931f37a6395fcef61e53ff742b49c97/coverage-7.6.10-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec22b5e7fe7a0fa8509181c4aac1db48f3dd4d3a566131b313d1efc102892c18", size = 238235 },
|
||||
{ url = "https://files.pythonhosted.org/packages/9a/0b/7797d4193f5adb4b837207ed87fecf5fc38f7cc612b369a8e8e12d9fa114/coverage-7.6.10-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26bcf5c4df41cad1b19c84af71c22cbc9ea9a547fc973f1f2cc9a290002c8b3c", size = 240220 },
|
||||
{ url = "https://files.pythonhosted.org/packages/65/4d/6f83ca1bddcf8e51bf8ff71572f39a1c73c34cf50e752a952c34f24d0a60/coverage-7.6.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e4630c26b6084c9b3cb53b15bd488f30ceb50b73c35c5ad7871b869cb7365fd", size = 239847 },
|
||||
{ url = "https://files.pythonhosted.org/packages/30/9d/2470df6aa146aff4c65fee0f87f58d2164a67533c771c9cc12ffcdb865d5/coverage-7.6.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2396e8116db77789f819d2bc8a7e200232b7a282c66e0ae2d2cd84581a89757e", size = 237922 },
|
||||
{ url = "https://files.pythonhosted.org/packages/08/dd/723fef5d901e6a89f2507094db66c091449c8ba03272861eaefa773ad95c/coverage-7.6.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:79109c70cc0882e4d2d002fe69a24aa504dec0cc17169b3c7f41a1d341a73694", size = 239783 },
|
||||
{ url = "https://files.pythonhosted.org/packages/3d/f7/64d3298b2baf261cb35466000628706ce20a82d42faf9b771af447cd2b76/coverage-7.6.10-cp313-cp313-win32.whl", hash = "sha256:9e1747bab246d6ff2c4f28b4d186b205adced9f7bd9dc362051cc37c4a0c7bd6", size = 210965 },
|
||||
{ url = "https://files.pythonhosted.org/packages/d5/58/ec43499a7fc681212fe7742fe90b2bc361cdb72e3181ace1604247a5b24d/coverage-7.6.10-cp313-cp313-win_amd64.whl", hash = "sha256:254f1a3b1eef5f7ed23ef265eaa89c65c8c5b6b257327c149db1ca9d4a35f25e", size = 211719 },
|
||||
{ url = "https://files.pythonhosted.org/packages/ab/c9/f2857a135bcff4330c1e90e7d03446b036b2363d4ad37eb5e3a47bbac8a6/coverage-7.6.10-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ccf240eb719789cedbb9fd1338055de2761088202a9a0b73032857e53f612fe", size = 209050 },
|
||||
{ url = "https://files.pythonhosted.org/packages/aa/b3/f840e5bd777d8433caa9e4a1eb20503495709f697341ac1a8ee6a3c906ad/coverage-7.6.10-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0c807ca74d5a5e64427c8805de15b9ca140bba13572d6d74e262f46f50b13273", size = 209321 },
|
||||
{ url = "https://files.pythonhosted.org/packages/85/7d/125a5362180fcc1c03d91850fc020f3831d5cda09319522bcfa6b2b70be7/coverage-7.6.10-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bcfa46d7709b5a7ffe089075799b902020b62e7ee56ebaed2f4bdac04c508d8", size = 252039 },
|
||||
{ url = "https://files.pythonhosted.org/packages/a9/9c/4358bf3c74baf1f9bddd2baf3756b54c07f2cfd2535f0a47f1e7757e54b3/coverage-7.6.10-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e0de1e902669dccbf80b0415fb6b43d27edca2fbd48c74da378923b05316098", size = 247758 },
|
||||
{ url = "https://files.pythonhosted.org/packages/cf/c7/de3eb6fc5263b26fab5cda3de7a0f80e317597a4bad4781859f72885f300/coverage-7.6.10-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7b444c42bbc533aaae6b5a2166fd1a797cdb5eb58ee51a92bee1eb94a1e1cb", size = 250119 },
|
||||
{ url = "https://files.pythonhosted.org/packages/3e/e6/43de91f8ba2ec9140c6a4af1102141712949903dc732cf739167cfa7a3bc/coverage-7.6.10-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b330368cb99ef72fcd2dc3ed260adf67b31499584dc8a20225e85bfe6f6cfed0", size = 249597 },
|
||||
{ url = "https://files.pythonhosted.org/packages/08/40/61158b5499aa2adf9e37bc6d0117e8f6788625b283d51e7e0c53cf340530/coverage-7.6.10-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9a7cfb50515f87f7ed30bc882f68812fd98bc2852957df69f3003d22a2aa0abf", size = 247473 },
|
||||
{ url = "https://files.pythonhosted.org/packages/50/69/b3f2416725621e9f112e74e8470793d5b5995f146f596f133678a633b77e/coverage-7.6.10-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f93531882a5f68c28090f901b1d135de61b56331bba82028489bc51bdd818d2", size = 248737 },
|
||||
{ url = "https://files.pythonhosted.org/packages/3c/6e/fe899fb937657db6df31cc3e61c6968cb56d36d7326361847440a430152e/coverage-7.6.10-cp313-cp313t-win32.whl", hash = "sha256:89d76815a26197c858f53c7f6a656686ec392b25991f9e409bcef020cd532312", size = 211611 },
|
||||
{ url = "https://files.pythonhosted.org/packages/1c/55/52f5e66142a9d7bc93a15192eba7a78513d2abf6b3558d77b4ca32f5f424/coverage-7.6.10-cp313-cp313t-win_amd64.whl", hash = "sha256:54a5f0f43950a36312155dae55c505a76cd7f2b12d26abeebbe7a0b36dbc868d", size = 212781 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "docstring-to-markdown"
|
||||
version = "0.15"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/7a/ad/6a66abd14676619bd56f6b924c96321a2e2d7d86558841d94a30023eec53/docstring-to-markdown-0.15.tar.gz", hash = "sha256:e146114d9c50c181b1d25505054a8d0f7a476837f0da2c19f07e06eaed52b73d", size = 29246 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c1/cf/4eee59f6c4111b3e80cc32cf6bac483a90646f5c8693e84496c9855e8e38/docstring_to_markdown-0.15-py3-none-any.whl", hash = "sha256:27afb3faedba81e34c33521c32bbd258d7fbb79eedf7d29bc4e81080e854aec0", size = 21640 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iniconfig"
|
||||
version = "2.0.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jedi"
|
||||
version = "0.19.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "parso" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0", size = 1231287 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c0/5a/9cac0c82afec3d09ccd97c8b6502d48f165f9124db81b4bcb90b4af974ee/jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9", size = 1572278 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "name"
|
||||
version = "0.1.0"
|
||||
source = { editable = "." }
|
||||
|
||||
[package.dev-dependencies]
|
||||
dev = [
|
||||
{ name = "pytest" },
|
||||
{ name = "pytest-cov" },
|
||||
{ name = "python-lsp-server" },
|
||||
{ name = "ruff" },
|
||||
]
|
||||
lint = [
|
||||
{ name = "ruff" },
|
||||
]
|
||||
lsp = [
|
||||
{ name = "python-lsp-server" },
|
||||
]
|
||||
test = [
|
||||
{ name = "pytest" },
|
||||
{ name = "pytest-cov" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
|
||||
[package.metadata.requires-dev]
|
||||
dev = [
|
||||
{ name = "pytest", specifier = ">=8.3.3" },
|
||||
{ name = "pytest-cov", specifier = ">=6.0.0" },
|
||||
{ name = "python-lsp-server" },
|
||||
{ name = "ruff", specifier = ">=0.6.7" },
|
||||
]
|
||||
lint = [{ name = "ruff", specifier = ">=0.6.7" }]
|
||||
lsp = [{ name = "python-lsp-server" }]
|
||||
test = [
|
||||
{ name = "pytest", specifier = ">=8.3.3" },
|
||||
{ name = "pytest-cov", specifier = ">=6.0.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "packaging"
|
||||
version = "24.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parso"
|
||||
version = "0.8.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d", size = 400609 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", size = 103650 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pluggy"
|
||||
version = "1.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pytest"
|
||||
version = "8.3.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
||||
{ name = "iniconfig" },
|
||||
{ name = "packaging" },
|
||||
{ name = "pluggy" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/05/35/30e0d83068951d90a01852cb1cef56e5d8a09d20c7f511634cc2f7e0372a/pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761", size = 1445919 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/11/92/76a1c94d3afee238333bc0a42b82935dd8f9cf8ce9e336ff87ee14d9e1cf/pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", size = 343083 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pytest-cov"
|
||||
version = "6.0.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "coverage" },
|
||||
{ name = "pytest" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/be/45/9b538de8cef30e17c7b45ef42f538a94889ed6a16f2387a6c89e73220651/pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0", size = 66945 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/36/3b/48e79f2cd6a61dbbd4807b4ed46cb564b4fd50a76166b1c4ea5c1d9e2371/pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35", size = 22949 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "python-lsp-jsonrpc"
|
||||
version = "1.1.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "ujson" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/48/b6/fd92e2ea4635d88966bb42c20198df1a981340f07843b5e3c6694ba3557b/python-lsp-jsonrpc-1.1.2.tar.gz", hash = "sha256:4688e453eef55cd952bff762c705cedefa12055c0aec17a06f595bcc002cc912", size = 15298 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/cb/d9/656659d5b5d5f402b2b174cd0ba9bc827e07ce3c0bf88da65424baf64af8/python_lsp_jsonrpc-1.1.2-py3-none-any.whl", hash = "sha256:7339c2e9630ae98903fdaea1ace8c47fba0484983794d6aafd0bd8989be2b03c", size = 8805 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "python-lsp-server"
|
||||
version = "1.12.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "docstring-to-markdown" },
|
||||
{ name = "jedi" },
|
||||
{ name = "pluggy" },
|
||||
{ name = "python-lsp-jsonrpc" },
|
||||
{ name = "ujson" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/2b/15/b7e1577b9ca358e008b06910bf23cfa0a8be130ee9f319a262a3c610ee8d/python_lsp_server-1.12.0.tar.gz", hash = "sha256:b6a336f128da03bd9bac1e61c3acca6e84242b8b31055a1ccf49d83df9dc053b", size = 114328 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/1d/49/37c9659f76dbf1018d88892c14184db36ce9df09ea7d760162584aee8a58/python_lsp_server-1.12.0-py3-none-any.whl", hash = "sha256:2e912c661881d85f67f2076e4e66268b695b62bf127e07e81f58b187d4bb6eda", size = 74782 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.8.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/34/37/9c02181ef38d55b77d97c68b78e705fd14c0de0e5d085202bb2b52ce5be9/ruff-0.8.4.tar.gz", hash = "sha256:0d5f89f254836799af1615798caa5f80b7f935d7a670fad66c5007928e57ace8", size = 3402103 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/05/67/f480bf2f2723b2e49af38ed2be75ccdb2798fca7d56279b585c8f553aaab/ruff-0.8.4-py3-none-linux_armv6l.whl", hash = "sha256:58072f0c06080276804c6a4e21a9045a706584a958e644353603d36ca1eb8a60", size = 10546415 },
|
||||
{ url = "https://files.pythonhosted.org/packages/eb/7a/5aba20312c73f1ce61814e520d1920edf68ca3b9c507bd84d8546a8ecaa8/ruff-0.8.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ffb60904651c00a1e0b8df594591770018a0f04587f7deeb3838344fe3adabac", size = 10346113 },
|
||||
{ url = "https://files.pythonhosted.org/packages/76/f4/c41de22b3728486f0aa95383a44c42657b2db4062f3234ca36fc8cf52d8b/ruff-0.8.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6ddf5d654ac0d44389f6bf05cee4caeefc3132a64b58ea46738111d687352296", size = 9943564 },
|
||||
{ url = "https://files.pythonhosted.org/packages/0e/f0/afa0d2191af495ac82d4cbbfd7a94e3df6f62a04ca412033e073b871fc6d/ruff-0.8.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e248b1f0fa2749edd3350a2a342b67b43a2627434c059a063418e3d375cfe643", size = 10805522 },
|
||||
{ url = "https://files.pythonhosted.org/packages/12/57/5d1e9a0fd0c228e663894e8e3a8e7063e5ee90f8e8e60cf2085f362bfa1a/ruff-0.8.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf197b98ed86e417412ee3b6c893f44c8864f816451441483253d5ff22c0e81e", size = 10306763 },
|
||||
{ url = "https://files.pythonhosted.org/packages/04/df/f069fdb02e408be8aac6853583572a2873f87f866fe8515de65873caf6b8/ruff-0.8.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c41319b85faa3aadd4d30cb1cffdd9ac6b89704ff79f7664b853785b48eccdf3", size = 11359574 },
|
||||
{ url = "https://files.pythonhosted.org/packages/d3/04/37c27494cd02e4a8315680debfc6dfabcb97e597c07cce0044db1f9dfbe2/ruff-0.8.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9f8402b7c4f96463f135e936d9ab77b65711fcd5d72e5d67597b543bbb43cf3f", size = 12094851 },
|
||||
{ url = "https://files.pythonhosted.org/packages/81/b1/c5d7fb68506cab9832d208d03ea4668da9a9887a4a392f4f328b1bf734ad/ruff-0.8.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4e56b3baa9c23d324ead112a4fdf20db9a3f8f29eeabff1355114dd96014604", size = 11655539 },
|
||||
{ url = "https://files.pythonhosted.org/packages/ef/38/8f8f2c8898dc8a7a49bc340cf6f00226917f0f5cb489e37075bcb2ce3671/ruff-0.8.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:736272574e97157f7edbbb43b1d046125fce9e7d8d583d5d65d0c9bf2c15addf", size = 12912805 },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/dd/fa6660c279f4eb320788876d0cff4ea18d9af7d9ed7216d7bd66877468d0/ruff-0.8.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fe710ab6061592521f902fca7ebcb9fabd27bc7c57c764298b1c1f15fff720", size = 11205976 },
|
||||
{ url = "https://files.pythonhosted.org/packages/a8/d7/de94cc89833b5de455750686c17c9e10f4e1ab7ccdc5521b8fe911d1477e/ruff-0.8.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:13e9ec6d6b55f6da412d59953d65d66e760d583dd3c1c72bf1f26435b5bfdbae", size = 10792039 },
|
||||
{ url = "https://files.pythonhosted.org/packages/6d/15/3e4906559248bdbb74854af684314608297a05b996062c9d72e0ef7c7097/ruff-0.8.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:97d9aefef725348ad77d6db98b726cfdb075a40b936c7984088804dfd38268a7", size = 10400088 },
|
||||
{ url = "https://files.pythonhosted.org/packages/a2/21/9ed4c0e8133cb4a87a18d470f534ad1a8a66d7bec493bcb8bda2d1a5d5be/ruff-0.8.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ab78e33325a6f5374e04c2ab924a3367d69a0da36f8c9cb6b894a62017506111", size = 10900814 },
|
||||
{ url = "https://files.pythonhosted.org/packages/0d/5d/122a65a18955bd9da2616b69bc839351f8baf23b2805b543aa2f0aed72b5/ruff-0.8.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8ef06f66f4a05c3ddbc9121a8b0cecccd92c5bf3dd43b5472ffe40b8ca10f0f8", size = 11268828 },
|
||||
{ url = "https://files.pythonhosted.org/packages/43/a9/1676ee9106995381e3d34bccac5bb28df70194167337ed4854c20f27c7ba/ruff-0.8.4-py3-none-win32.whl", hash = "sha256:552fb6d861320958ca5e15f28b20a3d071aa83b93caee33a87b471f99a6c0835", size = 8805621 },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/98/ed6b56a30ee76771c193ff7ceeaf1d2acc98d33a1a27b8479cbdb5c17a23/ruff-0.8.4-py3-none-win_amd64.whl", hash = "sha256:f21a1143776f8656d7f364bd264a9d60f01b7f52243fbe90e7670c0dfe0cf65d", size = 9660086 },
|
||||
{ url = "https://files.pythonhosted.org/packages/13/9f/026e18ca7d7766783d779dae5e9c656746c6ede36ef73c6d934aaf4a6dec/ruff-0.8.4-py3-none-win_arm64.whl", hash = "sha256:9183dd615d8df50defa8b1d9a074053891ba39025cf5ae88e8bcb52edcc4bf08", size = 9074500 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ujson"
|
||||
version = "5.10.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f0/00/3110fd566786bfa542adb7932d62035e0c0ef662a8ff6544b6643b3d6fd7/ujson-5.10.0.tar.gz", hash = "sha256:b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1", size = 7154885 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e8/a6/fd3f8bbd80842267e2d06c3583279555e8354c5986c952385199d57a5b6c/ujson-5.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:98ba15d8cbc481ce55695beee9f063189dce91a4b08bc1d03e7f0152cd4bbdd5", size = 55642 },
|
||||
{ url = "https://files.pythonhosted.org/packages/a8/47/dd03fd2b5ae727e16d5d18919b383959c6d269c7b948a380fdd879518640/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a9d2edbf1556e4f56e50fab7d8ff993dbad7f54bac68eacdd27a8f55f433578e", size = 51807 },
|
||||
{ url = "https://files.pythonhosted.org/packages/25/23/079a4cc6fd7e2655a473ed9e776ddbb7144e27f04e8fc484a0fb45fe6f71/ujson-5.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6627029ae4f52d0e1a2451768c2c37c0c814ffc04f796eb36244cf16b8e57043", size = 51972 },
|
||||
{ url = "https://files.pythonhosted.org/packages/04/81/668707e5f2177791869b624be4c06fb2473bf97ee33296b18d1cf3092af7/ujson-5.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8ccb77b3e40b151e20519c6ae6d89bfe3f4c14e8e210d910287f778368bb3d1", size = 53686 },
|
||||
{ url = "https://files.pythonhosted.org/packages/bd/50/056d518a386d80aaf4505ccf3cee1c40d312a46901ed494d5711dd939bc3/ujson-5.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3caf9cd64abfeb11a3b661329085c5e167abbe15256b3b68cb5d914ba7396f3", size = 58591 },
|
||||
{ url = "https://files.pythonhosted.org/packages/fc/d6/aeaf3e2d6fb1f4cfb6bf25f454d60490ed8146ddc0600fae44bfe7eb5a72/ujson-5.10.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6e32abdce572e3a8c3d02c886c704a38a1b015a1fb858004e03d20ca7cecbb21", size = 997853 },
|
||||
{ url = "https://files.pythonhosted.org/packages/f8/d5/1f2a5d2699f447f7d990334ca96e90065ea7f99b142ce96e85f26d7e78e2/ujson-5.10.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a65b6af4d903103ee7b6f4f5b85f1bfd0c90ba4eeac6421aae436c9988aa64a2", size = 1140689 },
|
||||
{ url = "https://files.pythonhosted.org/packages/f2/2c/6990f4ccb41ed93744aaaa3786394bca0875503f97690622f3cafc0adfde/ujson-5.10.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:604a046d966457b6cdcacc5aa2ec5314f0e8c42bae52842c1e6fa02ea4bda42e", size = 1043576 },
|
||||
{ url = "https://files.pythonhosted.org/packages/14/f5/a2368463dbb09fbdbf6a696062d0c0f62e4ae6fa65f38f829611da2e8fdd/ujson-5.10.0-cp312-cp312-win32.whl", hash = "sha256:6dea1c8b4fc921bf78a8ff00bbd2bfe166345f5536c510671bccececb187c80e", size = 38764 },
|
||||
{ url = "https://files.pythonhosted.org/packages/59/2d/691f741ffd72b6c84438a93749ac57bf1a3f217ac4b0ea4fd0e96119e118/ujson-5.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:38665e7d8290188b1e0d57d584eb8110951a9591363316dd41cf8686ab1d0abc", size = 42211 },
|
||||
{ url = "https://files.pythonhosted.org/packages/0d/69/b3e3f924bb0e8820bb46671979770c5be6a7d51c77a66324cdb09f1acddb/ujson-5.10.0-cp313-cp313-macosx_10_9_x86_64.whl", hash = "sha256:618efd84dc1acbd6bff8eaa736bb6c074bfa8b8a98f55b61c38d4ca2c1f7f287", size = 55646 },
|
||||
{ url = "https://files.pythonhosted.org/packages/32/8a/9b748eb543c6cabc54ebeaa1f28035b1bd09c0800235b08e85990734c41e/ujson-5.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38d5d36b4aedfe81dfe251f76c0467399d575d1395a1755de391e58985ab1c2e", size = 51806 },
|
||||
{ url = "https://files.pythonhosted.org/packages/39/50/4b53ea234413b710a18b305f465b328e306ba9592e13a791a6a6b378869b/ujson-5.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67079b1f9fb29ed9a2914acf4ef6c02844b3153913eb735d4bf287ee1db6e557", size = 51975 },
|
||||
{ url = "https://files.pythonhosted.org/packages/b4/9d/8061934f960cdb6dd55f0b3ceeff207fcc48c64f58b43403777ad5623d9e/ujson-5.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7d0e0ceeb8fe2468c70ec0c37b439dd554e2aa539a8a56365fd761edb418988", size = 53693 },
|
||||
{ url = "https://files.pythonhosted.org/packages/f5/be/7bfa84b28519ddbb67efc8410765ca7da55e6b93aba84d97764cd5794dbc/ujson-5.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:59e02cd37bc7c44d587a0ba45347cc815fb7a5fe48de16bf05caa5f7d0d2e816", size = 58594 },
|
||||
{ url = "https://files.pythonhosted.org/packages/48/eb/85d465abafb2c69d9699cfa5520e6e96561db787d36c677370e066c7e2e7/ujson-5.10.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a890b706b64e0065f02577bf6d8ca3b66c11a5e81fb75d757233a38c07a1f20", size = 997853 },
|
||||
{ url = "https://files.pythonhosted.org/packages/9f/76/2a63409fc05d34dd7d929357b7a45e3a2c96f22b4225cd74becd2ba6c4cb/ujson-5.10.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:621e34b4632c740ecb491efc7f1fcb4f74b48ddb55e65221995e74e2d00bbff0", size = 1140694 },
|
||||
{ url = "https://files.pythonhosted.org/packages/45/ed/582c4daba0f3e1688d923b5cb914ada1f9defa702df38a1916c899f7c4d1/ujson-5.10.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b9500e61fce0cfc86168b248104e954fead61f9be213087153d272e817ec7b4f", size = 1043580 },
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/0c/9837fece153051e19c7bade9f88f9b409e026b9525927824cdf16293b43b/ujson-5.10.0-cp313-cp313-win32.whl", hash = "sha256:4c4fc16f11ac1612f05b6f5781b384716719547e142cfd67b65d035bd85af165", size = 38766 },
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/72/6cb6728e2738c05bbe9bd522d6fc79f86b9a28402f38663e85a28fddd4a0/ujson-5.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:4573fd1695932d4f619928fd09d5d03d917274381649ade4328091ceca175539", size = 42212 },
|
||||
]
|
||||
1
files/templates/rust/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
7
files/templates/rust/Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "rust"
|
||||
version = "0.1.0"
|
||||
6
files/templates/rust/Cargo.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "rust"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
70
files/templates/rust/flake.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# heavily inspired by https://github.com/nulladmin1/nix-flake-templates/blob/main/rust-fenix-naersk/flake.nix
|
||||
{
|
||||
description = "Rust Flake using Fenix and Naersk";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, naersk
|
||||
, fenix
|
||||
, systems
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
pkgsFor = forEachSystem (system:
|
||||
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
fenix.overlays.default
|
||||
];
|
||||
});
|
||||
rust-toolchain = forEachSystem (system: pkgsFor.${system}.fenix.stable);
|
||||
in
|
||||
{
|
||||
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
|
||||
|
||||
devShells = forEachSystem (system: {
|
||||
default = pkgsFor.${system}.mkShell {
|
||||
packages = with rust-toolchain.${system}; [
|
||||
cargo
|
||||
rustc
|
||||
clippy
|
||||
rustfmt
|
||||
rust-analyzer
|
||||
];
|
||||
env = {
|
||||
RUST_BACKTRACE = "full";
|
||||
};
|
||||
RUST_SRC_PATH = "${rust-toolchain.${system}.rust-src}/lib/rustlib/src/rust/library";
|
||||
};
|
||||
});
|
||||
|
||||
packages = forEachSystem (system: {
|
||||
default =
|
||||
(pkgsFor.${system}.callPackage naersk {
|
||||
inherit (rust-toolchain.${system}) cargo rustc;
|
||||
}).buildPackage {
|
||||
src = ./.;
|
||||
};
|
||||
});
|
||||
|
||||
apps = forEachSystem (system: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/rust";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
3
files/templates/rust/src/main.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
BIN
files/topology-images/DELL-C2665dnf.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
files/topology-images/TL-SG1005D.png
Normal file
|
After Width: | Height: | Size: 393 KiB |
BIN
files/topology-images/TL-SG108.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
files/topology-images/ankisync.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
files/topology-images/croc.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
files/topology-images/firefly-iii.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
files/topology-images/freshrss.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
files/topology-images/huawei.png
Normal file
|
After Width: | Height: | Size: 157 KiB |
BIN
files/topology-images/hunsn.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
files/topology-images/kavita.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
files/topology-images/koillection.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
files/topology-images/mac.png
Normal file
|
After Width: | Height: | Size: 329 KiB |
BIN
files/topology-images/microbin.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
files/topology-images/mpd.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
files/topology-images/nintendo-switch.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
files/topology-images/pc.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
files/topology-images/phone.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
files/topology-images/readarr.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
files/topology-images/shlink.png
Normal file
|
After Width: | Height: | Size: 250 KiB |
BIN
files/topology-images/zflip6.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
196
files/vieb/viebrc
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
" Options
|
||||
set adblocker=update
|
||||
set adblockernotifications=all
|
||||
set cache=clearonquit
|
||||
set noclearcookiesonquit
|
||||
set nocleardownloadsoncompleted
|
||||
set nocleardownloadsonquit
|
||||
set clearhistoryinterval=none
|
||||
set noclearlocalstorageonquit
|
||||
set noclosablepinnedtabs
|
||||
set commandhist=persistuseronly
|
||||
set containerkeeponreopen
|
||||
set containernewtab=s:usecurrent
|
||||
set containershowname=automatic
|
||||
set containersplitpage=s:usecurrent
|
||||
set containerstartuppage=main
|
||||
set countlimit=100
|
||||
" set nodarkreader
|
||||
set darkreaderbg=#181a1b
|
||||
set darkreaderbrightness=100
|
||||
set darkreadercontrast=100
|
||||
set darkreaderfg=#e8e6e3
|
||||
set darkreadergrayscale=0
|
||||
set darkreadermode=dark
|
||||
set darkreadersepia=0
|
||||
set darkreadertextstroke=0
|
||||
set devtoolsposition=split
|
||||
set dialogalert=notifyblock
|
||||
set dialogconfirm=notifyallow
|
||||
set dialogprompt=notifyblock
|
||||
set downloadmethod=automatic
|
||||
set downloadpath=
|
||||
set encodeurlcopy=nospaces
|
||||
set encodeurlext=nospaces
|
||||
set explorehist=persist
|
||||
set externalcommand=
|
||||
set favicons=session
|
||||
set followchars=numbers
|
||||
set followfallbackaction=filter
|
||||
set followlabelposition=outsiderighttop
|
||||
set follownewtabswitch
|
||||
set guifontsize=14
|
||||
set guifullscreennavbar=oninput
|
||||
set guifullscreentabbar=onupdate
|
||||
set guihidetimeout=5000
|
||||
set guinavbar=oninput
|
||||
set guiscrollbar=onscroll
|
||||
set guitabbar=onupdate
|
||||
set historyperpage=100
|
||||
set ignorecase
|
||||
set incsearch
|
||||
set inputfocusalignment=rememberend
|
||||
set keeprecentlyclosed
|
||||
set lang=en
|
||||
set loadingindicator=line
|
||||
set mapsuggest=9000000000000000
|
||||
set mapsuggestposition=topright
|
||||
set markposition=newtab
|
||||
set markpositionshifted=default
|
||||
set maxmapdepth=10
|
||||
set menupage=elementasneeded
|
||||
set menusuggest=both
|
||||
set menuvieb=both
|
||||
set mintabwidth=28
|
||||
set mouse=all
|
||||
set mousedisabledbehavior=nothing
|
||||
set nomousefocus
|
||||
set mousenewtabswitch
|
||||
set mousevisualmode=onswitch
|
||||
set nativenotification=never
|
||||
set nativetheme=dark
|
||||
set newtaburl=
|
||||
set notificationduration=6000
|
||||
set notificationforpermissions=silent
|
||||
set notificationforsystemcommands=errors
|
||||
set notificationlimitsmall=3
|
||||
set notificationposition=bottomright
|
||||
set pdfbehavior=download
|
||||
set permissioncamera=ask
|
||||
set permissioncertificateerror=allow
|
||||
set permissionclipboardread=allow
|
||||
set permissionclipboardwrite=allow
|
||||
set permissionclosepage=allow
|
||||
set permissiondisplaycapture=ask
|
||||
set permissionfullscreen=allow
|
||||
set permissiongeolocation=block
|
||||
set permissionhid=block
|
||||
set permissionidledetection=block
|
||||
set permissionmediadevices=allowfull
|
||||
set permissionmicrophone=ask
|
||||
set permissionmidi=ask
|
||||
set permissionmidisysex=ask
|
||||
set permissionnotifications=ask
|
||||
set permissionopenexternal=ask
|
||||
set permissionpersistentstorage=ask
|
||||
set permissionpointerlock=block
|
||||
set permissionscreenwakelock=block
|
||||
set permissionsensors=block
|
||||
set permissionserial=block
|
||||
set permissionunknown=ask
|
||||
set permissionusb=allow
|
||||
set permissionwindowmanagement=ask
|
||||
set pointerposlocalid=domain
|
||||
set pointerpostype=casing
|
||||
set noquitonlasttabclose
|
||||
set redirecttohttp
|
||||
set noreloadtaboncrash
|
||||
set replacespecial=special
|
||||
set replacestartup=never
|
||||
set requesttimeout=20000
|
||||
set restoretabs=all
|
||||
set scrollposlocalid=domain
|
||||
set scrollpostype=casing
|
||||
set searchemptyscope=global
|
||||
set searchpointeralignment=left
|
||||
set searchscope=global
|
||||
set shell=
|
||||
set showcmd
|
||||
set smartcase
|
||||
set spell
|
||||
set nosplitbelow
|
||||
set nosplitright
|
||||
set nosponsorblock
|
||||
set suggestbouncedelay=100
|
||||
set suggestcommands=9000000000000000
|
||||
set suggesttopsites=10
|
||||
set suspendbackgroundtab
|
||||
set suspendonrestore=regular
|
||||
set suspendtimeout=0
|
||||
set tabclosefocus=left
|
||||
set tabcycle
|
||||
set tabnewposition=right
|
||||
set tabopenmuted=never
|
||||
set taboverflow=scroll
|
||||
set tabreopenmuted=remember
|
||||
set tabreopenposition=right
|
||||
set timeout
|
||||
set timeoutlen=2000
|
||||
set translateapi=auto
|
||||
set translatekey=
|
||||
set translatelang=en-us
|
||||
set translateurl=https://api-free.deepl.com/v2/
|
||||
" set nouserscript
|
||||
" set nouserstyle
|
||||
set useragent=%firefox
|
||||
set vimcommand=gvim
|
||||
set windowfullscreen=restore
|
||||
set windowmaximize=restore
|
||||
set windowposition=restore
|
||||
set windowsize=restore
|
||||
set windowtitle="%app - %title"
|
||||
|
||||
" Commands
|
||||
colorscheme default
|
||||
|
||||
|
||||
" Mappings
|
||||
nmap o <toExploreMode>
|
||||
nmap t <:tabnew><toExploreMode>
|
||||
nmap b <toCommandMode>buffer<Space>
|
||||
nmap g0 <:buffer 0>
|
||||
nmap g^ <:buffer 0>
|
||||
nmap g$ <:buffer -1>
|
||||
nmap <C-m> <:buffer #>
|
||||
nmap J <previousTab>
|
||||
nmap K <nextTab>
|
||||
nmap >> <moveTabForward>
|
||||
nmap <lt><lt> <moveTabBackward>
|
||||
nmap O <toExploreMode><End>
|
||||
nmap gx0 <:lclose>
|
||||
nmap gx$ <:rclose>
|
||||
nmap x <stopLoadingPage>
|
||||
nunmap [
|
||||
nunmap ]
|
||||
nmap [[ <previousPage>
|
||||
nmap ]] <nextPage>
|
||||
nmap [c <decreasePageNumber>
|
||||
nmap ]c <increasePageNumber>
|
||||
nmap zz <zoomReset>
|
||||
nmap zi <zoomIn>
|
||||
nmap zo <zoomOut>
|
||||
nmap zm 5<zoomIn>
|
||||
nmap zr 5<zoomOut>
|
||||
nmap zM 5<zoomIn>
|
||||
nmap zR 5<zoomOut>
|
||||
nmap zI 7<zoomIn>
|
||||
nmap zO 7<zoomOut>
|
||||
|
||||
" Search
|
||||
set searchengine=https://kagi.com/search?q=%s
|
||||
set searchwords+=no~https://search.nixos.org/options?query=%s
|
||||
set searchwords+=np~https://search.nixos.org/packages?query=%s
|
||||
set searchwords+=hm~https://home-manager-options.extranix.com/?query=%s
|
||||
|
||||
" Viebrc generated by Vieb
|
||||
" vim: ft=vim
|
||||
BIN
files/wallpaper/botanicswp.png
Normal file
|
After Width: | Height: | Size: 4.5 MiB |
|
Before Width: | Height: | Size: 7.9 MiB After Width: | Height: | Size: 7.9 MiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |