Compare commits
118 commits
d2e9f300ce
...
38268c61ea
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 38268c61ea | ||
Bruno BELANYI | 7b9a04ba86 | ||
Bruno BELANYI | 906299a1ef | ||
Bruno BELANYI | f41f974e5f | ||
Bruno BELANYI | 380991d5a7 | ||
Bruno BELANYI | 6091c0ccd6 | ||
Bruno BELANYI | 9fca6c2011 | ||
Bruno BELANYI | 53a0a1f613 | ||
Bruno BELANYI | d1521a4a85 | ||
Bruno BELANYI | a8f3a5b6cc | ||
Bruno BELANYI | 576f18e083 | ||
Bruno BELANYI | e5e9769f5c | ||
Bruno BELANYI | 740432cd90 | ||
Bruno BELANYI | 738c50c05e | ||
Bruno BELANYI | 2f0d9cf70d | ||
Bruno BELANYI | 2c51cb52c6 | ||
Bruno BELANYI | 74b1c5a83d | ||
Bruno BELANYI | 463aa0a80c | ||
Bruno BELANYI | 1d8c10ecf5 | ||
Bruno BELANYI | c108c04ff8 | ||
Bruno BELANYI | da9d84da3d | ||
Bruno BELANYI | 270c3a560d | ||
Bruno BELANYI | 136de66291 | ||
Bruno BELANYI | 04439f1d95 | ||
Bruno BELANYI | 0744d8ea86 | ||
Bruno BELANYI | a877570e4d | ||
Bruno BELANYI | aedd0798e8 | ||
Bruno BELANYI | 5a0197922e | ||
Bruno BELANYI | 26495fc8b2 | ||
Bruno BELANYI | 46bd23ff07 | ||
Bruno BELANYI | 62de2772a4 | ||
Bruno BELANYI | 8475d92314 | ||
Bruno BELANYI | 07552f3070 | ||
Bruno BELANYI | 5b66145be3 | ||
Bruno BELANYI | 67eb7bdd4b | ||
Bruno BELANYI | 6d2ac0c473 | ||
Bruno BELANYI | 46df8b5b5b | ||
Bruno BELANYI | cf1aeaf088 | ||
Bruno BELANYI | a09cef76c5 | ||
Bruno BELANYI | 0547ebc33c | ||
Bruno BELANYI | 8e81d148bd | ||
Bruno BELANYI | b10d936c0a | ||
Bruno BELANYI | eec65dc6b3 | ||
Bruno BELANYI | 09f763bc16 | ||
Bruno BELANYI | 79f08ea5a1 | ||
Bruno BELANYI | 38f3ac0ce5 | ||
Bruno BELANYI | 898523d079 | ||
Bruno BELANYI | cbba752b54 | ||
Bruno BELANYI | 20db71996c | ||
Bruno BELANYI | b0029448c6 | ||
Bruno BELANYI | 3aab65d9ea | ||
Bruno BELANYI | b6279108e0 | ||
Bruno BELANYI | 0f3c5d1d63 | ||
Bruno BELANYI | 1f40ac4a9f | ||
Bruno BELANYI | 2b64a00dc9 | ||
Bruno BELANYI | 1aa3385e13 | ||
Bruno BELANYI | a059828a58 | ||
Bruno BELANYI | 96e1a54638 | ||
Bruno BELANYI | f24cf2e16d | ||
Bruno BELANYI | cedac6bbf4 | ||
Bruno BELANYI | 129d4b3a5a | ||
Bruno BELANYI | c1eab0edee | ||
Bruno BELANYI | 4a38757db9 | ||
Bruno BELANYI | 8d344b5d51 | ||
Bruno BELANYI | 8a6af0e5b7 | ||
Bruno BELANYI | 4f73945e28 | ||
Bruno BELANYI | 6529bea6bb | ||
Bruno BELANYI | e67b055a7b | ||
Bruno BELANYI | fbd3b70d61 | ||
Bruno BELANYI | f91286d13b | ||
Bruno BELANYI | 90dcf3a164 | ||
Bruno BELANYI | a713913eef | ||
Bruno BELANYI | 9b7bab8e83 | ||
Bruno BELANYI | 0d2b9c9699 | ||
Bruno BELANYI | 6f00036b79 | ||
Bruno BELANYI | 52197a4f96 | ||
Bruno BELANYI | fb4047b2b3 | ||
Bruno BELANYI | 445cb43cb4 | ||
Bruno BELANYI | 10727f9eea | ||
Bruno BELANYI | 44c11fc431 | ||
Bruno BELANYI | e94bdef690 | ||
Bruno BELANYI | 483c5d23e0 | ||
Bruno BELANYI | 8ed69de4be | ||
Bruno BELANYI | f240730c4f | ||
Bruno BELANYI | 93dfe04114 | ||
Bruno BELANYI | 1e2872c5c7 | ||
Bruno BELANYI | 9ed2dcefde | ||
Bruno BELANYI | 0d820cc2f4 | ||
Bruno BELANYI | ace266b02c | ||
Bruno BELANYI | 6b7510cfd9 | ||
Bruno BELANYI | 58760280be | ||
Bruno BELANYI | 4de7886950 | ||
Bruno BELANYI | d04de7d213 | ||
Bruno BELANYI | b5216a6a50 | ||
Bruno BELANYI | 442eef0482 | ||
Bruno BELANYI | 997f208d30 | ||
Bruno BELANYI | 326f9d039a | ||
Bruno BELANYI | abaa7119e7 | ||
Bruno BELANYI | c6735f3912 | ||
Bruno BELANYI | 3438290e32 | ||
Bruno BELANYI | 82f49f1389 | ||
Bruno BELANYI | 5918a0b9e6 | ||
Bruno BELANYI | a7c542784c | ||
Bruno BELANYI | 280829b54f | ||
Bruno BELANYI | 5ffe2653c0 | ||
Bruno BELANYI | 5592a120a4 | ||
Bruno BELANYI | bcd9a31bb8 | ||
Bruno BELANYI | 966934a8bc | ||
Bruno BELANYI | 88e4d72366 | ||
Bruno BELANYI | 16d68022eb | ||
Bruno BELANYI | 0de9966127 | ||
Bruno BELANYI | 452399ee4c | ||
Bruno BELANYI | 6a6f3aed63 | ||
Bruno BELANYI | 04de570926 | ||
Bruno BELANYI | 1644e95243 | ||
Bruno BELANYI | abb78d63e2 | ||
Bruno BELANYI | 4943df69ef | ||
Bruno BELANYI | f11cdb3675 |
59
flake.lock
59
flake.lock
|
@ -14,11 +14,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718371084,
|
"lastModified": 1723293904,
|
||||||
"narHash": "sha256-abpBi61mg0g+lFFU0zY4C6oP6fBwPzbHPKBGw676xsA=",
|
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "3a56735779db467538fb2e577eda28a9daacaca6",
|
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -73,11 +73,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717285511,
|
"lastModified": 1730504689,
|
||||||
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -94,11 +94,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1726560853,
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -136,11 +136,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719438532,
|
"lastModified": 1730837930,
|
||||||
"narHash": "sha256-/Vmso2ZMoFE3M7d1MRsQ2K5sR8CVKnrM6t1ys9Xjpz4=",
|
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "1a4f12ae0bda877ec4099b429cf439aad897d7e9",
|
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -150,13 +150,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"impermanence": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1697303681,
|
||||||
|
"narHash": "sha256-caJ0rXeagaih+xTgRduYtYKL1rZ9ylh06CIrt1w5B4g=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"rev": "0f317c2e9e56550ce12323eb39302d251618f5b5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719254875,
|
"lastModified": 1730785428,
|
||||||
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=",
|
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
|
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -168,11 +184,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719564461,
|
"lastModified": 1730885145,
|
||||||
"narHash": "sha256-wCFs1sf1tPoV3nCG5N5KaakAKm88FyzN6pRdOsOqNZg=",
|
"narHash": "sha256-UPrBEY0No1O3ULb67xYjRh2r3u7MnZovfo1oYSPCIxI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "7369862c4a8f293f6fde79044369dad7dfc04798",
|
"rev": "c0d8828600ef47d475e6ec33513bf9af6eb6b991",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -194,11 +210,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719259945,
|
"lastModified": 1730814269,
|
||||||
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
|
"narHash": "sha256-fWPHyhYE6xvMI1eGY3pwBTq85wcy1YXqdzTZF+06nOg=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
|
"rev": "d70155fdc00df4628446352fc58adc640cd705c2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -214,6 +230,7 @@
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"futils": "futils",
|
"futils": "futils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"impermanence": "impermanence",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
|
|
|
@ -43,6 +43,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
impermanence = {
|
||||||
|
type = "github";
|
||||||
|
owner = "nix-community";
|
||||||
|
repo = "impermanence";
|
||||||
|
ref = "master";
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
type = "github";
|
type = "github";
|
||||||
owner = "NixOS";
|
owner = "NixOS";
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
age-encryption.org/v1
|
|
||||||
-> ssh-ed25519 cKojmg xRtF3XVc7yPicAV/E4U7mn0itvD0h1BWBTjwunuoe2E
|
|
||||||
OkB9sjGB3ulH4Feuyj3Ed0DBG4+mghW/Qpum9oXL/8c
|
|
||||||
-> ssh-ed25519 jPowng 1r8drqhz1yZdTq0Kvqya+ArU1C2fkN7Gg9LiWWfeUFg
|
|
||||||
cjbxntVwHvqLaJpiKs/Y8ojeb6e3/cLFcsoeuoobfFg
|
|
||||||
--- B1qA2PylJBrdZxZtCzlU2kRPvxLM+IrXTvR+ERxVtTY
|
|
||||||
"W9<57>Äbg¸©~Ì/áÕb4ãÕ†ú³ÜÔIÊ
|
|
||||||
Û}ð
§ËÅË-³²ªNó±”ÑC7vWœbºØ?¦8=œÉwÆBÃUpJClï²OÈ™³œnOÁ\
|
|
8
hosts/nixos/porthos/secrets/pdf-edit/login.age
Normal file
8
hosts/nixos/porthos/secrets/pdf-edit/login.age
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 cKojmg VYlHgHSLpfKb5bn1XA3aCpfX7M23DgbraLxxOfo9PDk
|
||||||
|
Rj+mDvAsWX3WwpuhTrOubmo17j/aud5+P87df5bosBA
|
||||||
|
-> ssh-ed25519 jPowng o9ZFaYrITZ6DjWw07Vk/+TkuU187/ytlEK4sw7G32G4
|
||||||
|
zmxlpDvDDEgQFqBVARXeX1ABhvfJ4uAHfa6mIxXzjAY
|
||||||
|
--- k/d9FWW8/OSo8EllwOBV74pZyX918u54jEljGk3ATUc
|
||||||
|
ü4+ø2{‘hE7!ÒGA`×<>_@Íß—´¡R_ý§6J„ñL4v,‚6%ô‡øó#^® Ù¹
åB§OøF‚|’7ܽÉL]œÙjR¨
|
||||||
|
BþóÛ¾éaòs]xS<78>Î pbÞo#¬J1QŸ=t}5Õ>Oï‘{+¼.
M"7e»yý÷—
|
|
@ -48,9 +48,6 @@ in
|
||||||
owner = "matrix-synapse";
|
owner = "matrix-synapse";
|
||||||
publicKeys = all;
|
publicKeys = all;
|
||||||
};
|
};
|
||||||
"matrix/sliding-sync-secret.age" = {
|
|
||||||
publicKeys = all;
|
|
||||||
};
|
|
||||||
|
|
||||||
"mealie/mail.age" = {
|
"mealie/mail.age" = {
|
||||||
publicKeys = all;
|
publicKeys = all;
|
||||||
|
@ -77,13 +74,24 @@ in
|
||||||
"paperless/password.age".publicKeys = all;
|
"paperless/password.age".publicKeys = all;
|
||||||
"paperless/secret-key.age".publicKeys = all;
|
"paperless/secret-key.age".publicKeys = all;
|
||||||
|
|
||||||
|
"pdf-edit/login.age".publicKeys = all;
|
||||||
|
|
||||||
"podgrab/password.age".publicKeys = all;
|
"podgrab/password.age".publicKeys = all;
|
||||||
|
|
||||||
"pyload/credentials.age".publicKeys = all;
|
"pyload/credentials.age".publicKeys = all;
|
||||||
|
|
||||||
"sso/auth-key.age".publicKeys = all;
|
"sso/auth-key.age" = {
|
||||||
"sso/ambroisie/password-hash.age".publicKeys = all;
|
owner = "nginx-sso";
|
||||||
"sso/ambroisie/totp-secret.age".publicKeys = all;
|
publicKeys = all;
|
||||||
|
};
|
||||||
|
"sso/ambroisie/password-hash.age" = {
|
||||||
|
owner = "nginx-sso";
|
||||||
|
publicKeys = all;
|
||||||
|
};
|
||||||
|
"sso/ambroisie/totp-secret.age" = {
|
||||||
|
owner = "nginx-sso";
|
||||||
|
publicKeys = all;
|
||||||
|
};
|
||||||
|
|
||||||
"tandoor-recipes/secret-key.age".publicKeys = all;
|
"tandoor-recipes/secret-key.age".publicKeys = all;
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,6 @@ in
|
||||||
mailConfigFile = secrets."matrix/mail".path;
|
mailConfigFile = secrets."matrix/mail".path;
|
||||||
# Only necessary when doing the initial registration
|
# Only necessary when doing the initial registration
|
||||||
secretFile = secrets."matrix/secret".path;
|
secretFile = secrets."matrix/secret".path;
|
||||||
slidingSync = {
|
|
||||||
secretFile = secrets."matrix/sliding-sync-secret".path;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
mealie = {
|
mealie = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -127,20 +124,10 @@ in
|
||||||
passwordFile = secrets."paperless/password".path;
|
passwordFile = secrets."paperless/password".path;
|
||||||
secretKeyFile = secrets."paperless/secret-key".path;
|
secretKeyFile = secrets."paperless/secret-key".path;
|
||||||
};
|
};
|
||||||
# The whole *arr software suite
|
# Sometimes, editing PDFs is useful
|
||||||
pirate = {
|
pdf-edit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# ... But not Lidarr because I don't care for music that much
|
loginFile = secrets."pdf-edit/login".path;
|
||||||
lidarr = {
|
|
||||||
enable = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Podcast automatic downloader
|
|
||||||
podgrab = {
|
|
||||||
enable = true;
|
|
||||||
passwordFile = secrets."podgrab/password".path;
|
|
||||||
dataDir = "/data/media/podcasts";
|
|
||||||
port = 9598;
|
|
||||||
};
|
};
|
||||||
# Regular backups
|
# Regular backups
|
||||||
postgresql-backup.enable = true;
|
postgresql-backup.enable = true;
|
||||||
|
@ -152,7 +139,15 @@ in
|
||||||
rss-bridge.enable = true;
|
rss-bridge.enable = true;
|
||||||
# Usenet client
|
# Usenet client
|
||||||
sabnzbd.enable = true;
|
sabnzbd.enable = true;
|
||||||
# Because I stilll need to play sysadmin
|
# The whole *arr software suite
|
||||||
|
servarr = {
|
||||||
|
enable = true;
|
||||||
|
# ... But not Lidarr because I don't care for music that much
|
||||||
|
lidarr = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Because I still need to play sysadmin
|
||||||
ssh-server.enable = true;
|
ssh-server.enable = true;
|
||||||
# Recipe manager
|
# Recipe manager
|
||||||
tandoor-recipes = {
|
tandoor-recipes = {
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.home.atuin;
|
cfg = config.my.home.atuin;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.home.atuin = with lib; {
|
options.my.home.atuin = with lib; {
|
||||||
enable = my.mkDisableOption "atuin configuration";
|
enable = my.mkDisableOption "atuin configuration";
|
||||||
|
|
||||||
|
# I want the full experience by default
|
||||||
|
package = mkPackageOption pkgs "atuin" { };
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.atuin = {
|
programs.atuin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
inherit (cfg) package;
|
||||||
|
|
||||||
flags = [
|
flags = [
|
||||||
# I *despise* this hijacking of the up key, even though I use Ctrl-p
|
# I *despise* this hijacking of the up key, even though I use Ctrl-p
|
||||||
|
|
|
@ -5,11 +5,13 @@ in
|
||||||
{
|
{
|
||||||
options.my.home.calibre = with lib; {
|
options.my.home.calibre = with lib; {
|
||||||
enable = mkEnableOption "calibre configuration";
|
enable = mkEnableOption "calibre configuration";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "calibre" { };
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
calibre
|
cfg.package
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
# shellcheck disable=2155
|
# shellcheck disable=2155
|
||||||
use_android() {
|
use_android() {
|
||||||
|
@ -32,10 +32,16 @@ use_android() {
|
||||||
-b|--build-tools)
|
-b|--build-tools)
|
||||||
build_tools_version="$2"
|
build_tools_version="$2"
|
||||||
shift 2
|
shift 2
|
||||||
|
if ! [ -e "$ANDROID_HOME/build-tools/$build_tools_version" ]; then
|
||||||
|
log_error "use_android: build-tools version '$build_tools_version' does not exist"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
-n|--ndk)
|
-n|--ndk)
|
||||||
ndk_version="$2"
|
ndk_version="$2"
|
||||||
shift 2
|
shift 2
|
||||||
|
if ! [ -e "$ANDROID_HOME/ndk/$ndk_version" ]; then
|
||||||
|
log_error "use_android: NDK version '$ndk_version' does not exist"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
use_pkgs() {
|
use_pkgs() {
|
||||||
if ! has nix; then
|
if ! has nix; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
layout_postgres() {
|
layout_postgres() {
|
||||||
if ! has postgres || ! has initdb; then
|
if ! has postgres || ! has initdb; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
layout_poetry() {
|
layout_poetry() {
|
||||||
if ! has poetry; then
|
if ! has poetry; then
|
||||||
|
@ -9,12 +9,12 @@ layout_poetry() {
|
||||||
|
|
||||||
if [[ ! -f pyproject.toml ]]; then
|
if [[ ! -f pyproject.toml ]]; then
|
||||||
# shellcheck disable=2016
|
# shellcheck disable=2016
|
||||||
log_error 'layout_poetry: no pyproject.toml found. Use `poetry new` or `poetry init` to create one first'
|
log_error 'layout_poetry: no pyproject.toml found. Use `poetry init` to create one first'
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create venv if it doesn't exist
|
# create venv if it doesn't exist
|
||||||
poetry run true
|
poetry run -q -- true
|
||||||
|
|
||||||
# shellcheck disable=2155
|
# shellcheck disable=2155
|
||||||
export VIRTUAL_ENV=$(poetry env info --path)
|
export VIRTUAL_ENV=$(poetry env info --path)
|
||||||
|
@ -23,3 +23,34 @@ layout_poetry() {
|
||||||
watch_file pyproject.toml
|
watch_file pyproject.toml
|
||||||
watch_file poetry.lock
|
watch_file poetry.lock
|
||||||
}
|
}
|
||||||
|
|
||||||
|
layout_uv() {
|
||||||
|
if ! has uv; then
|
||||||
|
# shellcheck disable=2016
|
||||||
|
log_error 'layout_uv: `uv` is not in PATH'
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f pyproject.toml ]]; then
|
||||||
|
# shellcheck disable=2016
|
||||||
|
log_error 'layout_uv: no pyproject.toml found. Use `uv init` to create one first'
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local default_venv="$PWD/.venv"
|
||||||
|
: "${VIRTUAL_ENV:=$default_venv}"
|
||||||
|
|
||||||
|
# Use non-default venv path if required
|
||||||
|
if [ "$VIRTUAL_ENV" != "$default_venv" ]; then
|
||||||
|
export UV_PROJECT_ENVIRONMENT="$VIRTUAL_ENV"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create venv if it doesn't exist
|
||||||
|
uv venv -q
|
||||||
|
|
||||||
|
export VIRTUAL_ENV
|
||||||
|
export UV_ACTIVE=1
|
||||||
|
PATH_add "$VIRTUAL_ENV/bin"
|
||||||
|
watch_file pyproject.toml
|
||||||
|
watch_file uv.lock
|
||||||
|
}
|
||||||
|
|
|
@ -7,11 +7,13 @@ in
|
||||||
{
|
{
|
||||||
options.my.home.discord = with lib; {
|
options.my.home.discord = with lib; {
|
||||||
enable = mkEnableOption "discord configuration";
|
enable = mkEnableOption "discord configuration";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "discord" { };
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
discord
|
cfg.package
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg.configFile."discord/settings.json".source =
|
xdg.configFile."discord/settings.json".source =
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
" Use dark color scheme
|
" Use dark color scheme
|
||||||
colorscheme dark
|
colorscheme dark
|
||||||
|
|
||||||
" Make tridactyl open Vim in my prefered terminal
|
" Make tridactyl open Vim in my preferred terminal
|
||||||
set editorcmd @editorcmd@
|
set editorcmd @editorcmd@
|
||||||
|
|
||||||
" Remove editor file after use
|
" Remove editor file after use
|
||||||
|
|
|
@ -6,33 +6,28 @@ in
|
||||||
options.my.home.gdb = with lib; {
|
options.my.home.gdb = with lib; {
|
||||||
enable = my.mkDisableOption "gdb configuration";
|
enable = my.mkDisableOption "gdb configuration";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "gdb" { };
|
||||||
|
|
||||||
rr = {
|
rr = {
|
||||||
enable = my.mkDisableOption "rr configuration";
|
enable = my.mkDisableOption "rr configuration";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkPackageOption pkgs "rr" { };
|
||||||
type = types.package;
|
|
||||||
default = pkgs.rr;
|
|
||||||
defaultText = literalExample "pkgs.rr";
|
|
||||||
description = ''
|
|
||||||
Package providing rr
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
gdb
|
cfg.package
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
configFile."gdb/gdbinit".source = ./gdbinit;
|
configFile."gdb/gdbinit".source = ./gdbinit;
|
||||||
dataFile. "gdb/.keep".text = "";
|
stateFile."gdb/.keep".text = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
GDBHISTFILE = "${config.xdg.dataHome}/gdb/gdb_history";
|
GDBHISTFILE = "${config.xdg.stateHome}/gdb/gdb_history";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
package = pkgs.gnome.gnome-themes-extra;
|
package = pkgs.gnome-themes-extra;
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
};
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
package = pkgs.gnome.gnome-themes-extra;
|
package = pkgs.gnome-themes-extra;
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -58,7 +58,7 @@ in
|
||||||
{
|
{
|
||||||
config.accounts.email.accounts = {
|
config.accounts.email.accounts = {
|
||||||
personal = lib.mkMerge [
|
personal = lib.mkMerge [
|
||||||
# Common configuraton
|
# Common configuration
|
||||||
(mkConfig {
|
(mkConfig {
|
||||||
domain = "belanyi.fr";
|
domain = "belanyi.fr";
|
||||||
address = "bruno";
|
address = "bruno";
|
||||||
|
@ -70,7 +70,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
gmail = lib.mkMerge [
|
gmail = lib.mkMerge [
|
||||||
# Common configuraton
|
# Common configuration
|
||||||
(mkConfig {
|
(mkConfig {
|
||||||
domain = "gmail.com";
|
domain = "gmail.com";
|
||||||
address = "brunobelanyi";
|
address = "brunobelanyi";
|
||||||
|
|
|
@ -22,6 +22,10 @@ in
|
||||||
options.my.home.nix = with lib; {
|
options.my.home.nix = with lib; {
|
||||||
enable = my.mkDisableOption "nix configuration";
|
enable = my.mkDisableOption "nix configuration";
|
||||||
|
|
||||||
|
gc = {
|
||||||
|
enable = my.mkDisableOption "nix GC configuration";
|
||||||
|
};
|
||||||
|
|
||||||
cache = {
|
cache = {
|
||||||
selfHosted = my.mkDisableOption "self-hosted cache";
|
selfHosted = my.mkDisableOption "self-hosted cache";
|
||||||
};
|
};
|
||||||
|
@ -60,6 +64,22 @@ in
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(lib.mkIf cfg.gc.enable {
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
|
||||||
|
# Every week, with some wiggle room
|
||||||
|
frequency = "weekly";
|
||||||
|
randomizedDelaySec = "10min";
|
||||||
|
|
||||||
|
# Use a persistent timer for e.g: laptops
|
||||||
|
persistent = true;
|
||||||
|
|
||||||
|
# Delete old profiles automatically after 15 days
|
||||||
|
options = "--delete-older-than 15d";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
(lib.mkIf cfg.cache.selfHosted {
|
(lib.mkIf cfg.cache.selfHosted {
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -13,8 +13,8 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
GITHUB_TOKEN = ''$(cat ${lib.escapeShellArg config.age.secrets."github/token".path})'';
|
GITHUB_TOKEN = ''$(cat "${config.age.secrets."github/token".path}")'';
|
||||||
GITHUB_API_TOKEN = ''$(cat ${lib.escapeShellArg config.age.secrets."github/token".path})'';
|
GITHUB_API_TOKEN = ''$(cat "${config.age.secrets."github/token".path}")'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ in
|
||||||
# Clear the screen on start and exit
|
# Clear the screen on start and exit
|
||||||
LESS = "-R -+X -c";
|
LESS = "-R -+X -c";
|
||||||
# Better XDG compliance
|
# Better XDG compliance
|
||||||
LESSHISTFILE = "${config.xdg.dataHome}/less/history";
|
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
|
||||||
LESSKEY = "${config.xdg.configHome}/less/lesskey";
|
LESSKEY = "${config.xdg.configHome}/less/lesskey";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@ in
|
||||||
});
|
});
|
||||||
|
|
||||||
default = { ${config.my.home.terminal.program} = { }; };
|
default = { ${config.my.home.terminal.program} = { }; };
|
||||||
defaultText = litteralExpression ''
|
defaultText = literalExpression ''
|
||||||
{ ''${config.my.home.terminal.program} = { }; };
|
{ ''${config.my.home.terminal.program} = { }; };
|
||||||
'';
|
'';
|
||||||
example = { xterm-256color = { }; };
|
example = { xterm-256color = { }; };
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
|
||||||
call ftplugined#check_undo_ft()
|
|
||||||
|
|
||||||
" Don't show Netrw in buffer list
|
|
||||||
setlocal bufhidden=delete
|
|
||||||
let b:undo_ftplugin='|setlocal bufhidden<'
|
|
|
@ -1,7 +0,0 @@
|
||||||
local wk = require("which-key")
|
|
||||||
|
|
||||||
local keys = {
|
|
||||||
["<leader>"] = { "<cmd>nohls<CR>", "Clear search highlight" },
|
|
||||||
}
|
|
||||||
|
|
||||||
wk.register(keys, { prefix = "<leader>" })
|
|
|
@ -1,15 +0,0 @@
|
||||||
local wk = require("which-key")
|
|
||||||
local telescope_builtin = require("telescope.builtin")
|
|
||||||
|
|
||||||
local keys = {
|
|
||||||
f = {
|
|
||||||
name = "Fuzzy finder",
|
|
||||||
b = { telescope_builtin.buffers, "Open buffers" },
|
|
||||||
f = { telescope_builtin.git_files, "Git tracked files" },
|
|
||||||
F = { telescope_builtin.find_files, "Files" },
|
|
||||||
g = { telescope_builtin.live_grep, "Grep string" },
|
|
||||||
G = { telescope_builtin.grep_string, "Grep string under cursor" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
wk.register(keys, { prefix = "<leader>" })
|
|
|
@ -1,30 +0,0 @@
|
||||||
local wk = require("which-key")
|
|
||||||
|
|
||||||
local motions = {
|
|
||||||
["]m"] = "Next method start",
|
|
||||||
["]M"] = "Next method end",
|
|
||||||
["]S"] = "Next statement start",
|
|
||||||
["]]"] = "Next class start",
|
|
||||||
["]["] = "Next class end",
|
|
||||||
["[m"] = "Previous method start",
|
|
||||||
["[M"] = "Previous method end",
|
|
||||||
["[S"] = "Previous statement start",
|
|
||||||
["[["] = "Previous class start",
|
|
||||||
["[]"] = "Previous class end",
|
|
||||||
}
|
|
||||||
|
|
||||||
local objects = {
|
|
||||||
["aa"] = "a parameter",
|
|
||||||
["ia"] = "inner parameter",
|
|
||||||
["ab"] = "a block",
|
|
||||||
["ib"] = "inner block",
|
|
||||||
["ac"] = "a class",
|
|
||||||
["ic"] = "inner class",
|
|
||||||
["af"] = "a function",
|
|
||||||
["if"] = "inner function",
|
|
||||||
["ak"] = "a comment",
|
|
||||||
["aS"] = "a statement",
|
|
||||||
}
|
|
||||||
|
|
||||||
wk.register(motions, { mode = "n" })
|
|
||||||
wk.register(objects, { mode = "o" })
|
|
|
@ -3,126 +3,124 @@ local wk = require("which-key")
|
||||||
local lsp = require("ambroisie.lsp")
|
local lsp = require("ambroisie.lsp")
|
||||||
|
|
||||||
local keys = {
|
local keys = {
|
||||||
-- Edition and navigation mappins
|
-- Previous
|
||||||
["["] = {
|
{ "[", group = "Previous" },
|
||||||
name = "Previous",
|
-- Edition and navigation mappings
|
||||||
["<space>"] = "Insert blank line above",
|
{ "[<space>", desc = "Insert blank line above" },
|
||||||
["<C-L>"] = "Previous location list file",
|
{ "[<C-L>", desc = "Previous location list file" },
|
||||||
["<C-Q>"] = "Previous quickfix list file",
|
{ "[<C-Q>", desc = "Previous quickfix list file" },
|
||||||
["<C-T>"] = "Previous tag in preview window",
|
{ "[<C-T>", desc = "Previous tag in preview window" },
|
||||||
a = "Previous argument",
|
{ "[a", desc = "Previous argument" },
|
||||||
A = "First argument",
|
{ "[A", desc = "First argument" },
|
||||||
b = "Previous buffer",
|
{ "[b", desc = "Previous buffer" },
|
||||||
B = "First buffer",
|
{ "[B", desc = "First buffer" },
|
||||||
e = "Exchange previous line",
|
{ "[e", desc = "Exchange previous line" },
|
||||||
f = "Previous file in directory",
|
{ "[f", desc = "Previous file in directory" },
|
||||||
l = "Previous location list entry",
|
{ "[l", desc = "Previous location list entry" },
|
||||||
L = "First Location list entry",
|
{ "[L", desc = "First Location list entry" },
|
||||||
n = "Previous conflict marker/diff hunk",
|
{ "[n", desc = "Previous conflict marker/diff hunk" },
|
||||||
p = "Paste line above",
|
{ "[p", desc = "Paste line above" },
|
||||||
P = "Paste line above",
|
{ "[P", desc = "Paste line above" },
|
||||||
q = "Previous quickfix list entry",
|
{ "[q", desc = "Previous quickfix list entry" },
|
||||||
Q = "First quickfix list entry",
|
{ "[Q", desc = "First quickfix list entry" },
|
||||||
t = "Previous matching tag",
|
{ "[t", desc = "Previous matching tag" },
|
||||||
T = "First matching tag",
|
{ "[T", desc = "First matching tag" },
|
||||||
z = "Previous fold",
|
{ "[z", desc = "Previous fold" },
|
||||||
-- Encoding
|
-- Encoding
|
||||||
C = "C string encode",
|
{ "[C", desc = "C string encode" },
|
||||||
u = "URL encode",
|
{ "[u", desc = "URL encode" },
|
||||||
x = "XML encode",
|
{ "[x", desc = "XML encode" },
|
||||||
y = "C string encode",
|
{ "[y", desc = "C string encode" },
|
||||||
-- Custom
|
-- Custom
|
||||||
d = { lsp.goto_prev_diagnostic, "Previous diagnostic" },
|
{ "[d", lsp.goto_prev_diagnostic, desc = "Previous diagnostic" },
|
||||||
},
|
|
||||||
["]"] = {
|
|
||||||
name = "Next",
|
|
||||||
["<space>"] = "Insert blank line below",
|
|
||||||
["<C-L>"] = "Next location list file",
|
|
||||||
["<C-Q>"] = "Next quickfix list file",
|
|
||||||
["<C-T>"] = "Next tag in preview window",
|
|
||||||
a = "Next argument",
|
|
||||||
A = "Last argument",
|
|
||||||
b = "Next buffer",
|
|
||||||
B = "Last buffer",
|
|
||||||
e = "Exchange next line",
|
|
||||||
f = "Next file in directory",
|
|
||||||
l = "Next location list entry",
|
|
||||||
L = "Last Location list entry",
|
|
||||||
n = "Next conflict marker/diff hunk",
|
|
||||||
p = "Paste line below",
|
|
||||||
P = "Paste line below",
|
|
||||||
q = "Next quickfix list entry",
|
|
||||||
Q = "Last quickfix list entry",
|
|
||||||
t = "Next matching tag",
|
|
||||||
T = "Last matching tag",
|
|
||||||
z = "Next fold",
|
|
||||||
-- Decoding
|
|
||||||
C = "C string decode",
|
|
||||||
u = "URL decode",
|
|
||||||
x = "XML decode",
|
|
||||||
y = "C string decode",
|
|
||||||
-- Custom
|
|
||||||
d = { lsp.goto_next_diagnostic, "Next diagnostic" },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Option mappings
|
-- Next
|
||||||
["[o"] = {
|
{ "]", group = "Next" },
|
||||||
name = "Enable option",
|
-- Edition and navigation mappings
|
||||||
b = "Light background",
|
{ "]<space>", desc = "Insert blank line below" },
|
||||||
c = "Cursor line",
|
{ "]<C-L>", desc = "Next location list file" },
|
||||||
d = "Diff",
|
{ "]<C-Q>", desc = "Next quickfix list file" },
|
||||||
f = { "<cmd>FormatEnable<CR>", "LSP Formatting" },
|
{ "]<C-T>", desc = "Next tag in preview window" },
|
||||||
h = "Search high-lighting",
|
{ "]a", desc = "Next argument" },
|
||||||
i = "Case insensitive search",
|
{ "]A", desc = "Last argument" },
|
||||||
l = "List mode",
|
{ "]b", desc = "Next buffer" },
|
||||||
n = "Line numbers",
|
{ "]B", desc = "Last buffer" },
|
||||||
r = "Relative line numbers",
|
{ "]e", desc = "Exchange next line" },
|
||||||
p = { "<cmd>lwindow<CR>", "Location list" },
|
{ "]f", desc = "Next file in directory" },
|
||||||
q = { "<cmd>cwindow<CR>", "Quickfix list" },
|
{ "]l", desc = "Next location list entry" },
|
||||||
u = "Cursor column",
|
{ "]L", desc = "Last Location list entry" },
|
||||||
v = "Virtual editing",
|
{ "]n", desc = "Next conflict marker/diff hunk" },
|
||||||
w = "Text wrapping",
|
{ "]p", desc = "Paste line below" },
|
||||||
x = "Cursor line and column",
|
{ "]P", desc = "Paste line below" },
|
||||||
z = "Spell checking",
|
{ "]q", desc = "Next quickfix list entry" },
|
||||||
},
|
{ "]Q", desc = "Last quickfix list entry" },
|
||||||
["]o"] = {
|
{ "]t", desc = "Next matching tag" },
|
||||||
name = "Option off",
|
{ "]T", desc = "Last matching tag" },
|
||||||
b = "Light background",
|
{ "]z", desc = "Next fold" },
|
||||||
c = "Cursor line",
|
-- Decoding
|
||||||
d = "Diff",
|
{ "]C", desc = "C string decode" },
|
||||||
f = { "<cmd>FormatDisable<CR>", "LSP Formatting" },
|
{ "]u", desc = "URL decode" },
|
||||||
h = "Search high-lighting",
|
{ "]x", desc = "XML decode" },
|
||||||
i = "Case insensitive search",
|
{ "]y", desc = "C string decode" },
|
||||||
l = "List mode",
|
-- Custom
|
||||||
n = "Line numbers",
|
{ "]d", lsp.goto_next_diagnostic, desc = "Next diagnostic" },
|
||||||
p = { "<cmd>lclose<CR>", "Location list" },
|
|
||||||
q = { "<cmd>cclose<CR>", "Quickfix list" },
|
-- Enable option
|
||||||
r = "Relative line numbers",
|
{ "[o", group = "Enable option" },
|
||||||
u = "Cursor column",
|
{ "[ob", desc = "Light background" },
|
||||||
v = "Virtual editing",
|
{ "[oc", desc = "Cursor line" },
|
||||||
w = "Text wrapping",
|
{ "[od", desc = "Diff" },
|
||||||
x = "Cursor line and column",
|
{ "[of", "<cmd>FormatEnable<CR>", desc = "LSP Formatting" },
|
||||||
z = "Spell checking",
|
{ "[oh", desc = "Search high-lighting" },
|
||||||
},
|
{ "[oi", desc = "Case insensitive search" },
|
||||||
["yo"] = {
|
{ "[ol", desc = "List mode" },
|
||||||
name = "Option toggle",
|
{ "[on", desc = "Line numbers" },
|
||||||
b = "Light background",
|
{ "[or", desc = "Relative line numbers" },
|
||||||
c = "Cursor line",
|
{ "[op", "<cmd>lwindow<CR>", desc = "Location list" },
|
||||||
d = "Diff",
|
{ "[oq", "<cmd>cwindow<CR>", desc = "Quickfix list" },
|
||||||
f = { "<cmd>FormatToggle<CR>", "LSP Formatting" },
|
{ "[ou", desc = "Cursor column" },
|
||||||
h = "Search high-lighting",
|
{ "[ov", desc = "Virtual editing" },
|
||||||
i = "Case insensitive search",
|
{ "[ow", desc = "Text wrapping" },
|
||||||
l = "List mode",
|
{ "[ox", desc = "Cursor line and column" },
|
||||||
n = "Line numbers",
|
{ "[oz", desc = "Spell checking" },
|
||||||
p = { "<Plug>(qf_loc_toggle)", "Location list" },
|
|
||||||
q = { "<Plug>(qf_qf_toggle)", "Quickfix list" },
|
-- Disable option
|
||||||
r = "Relative line numbers",
|
{ "]o", group = "Disable option" },
|
||||||
u = "Cursor column",
|
{ "]ob", desc = "Light background" },
|
||||||
v = "Virtual editing",
|
{ "]oc", desc = "Cursor line" },
|
||||||
w = "Text wrapping",
|
{ "]od", desc = "Diff" },
|
||||||
x = "Cursor line and column",
|
{ "]of", "<cmd>FormatDisable<CR>", desc = "LSP Formatting" },
|
||||||
z = "Spell checking",
|
{ "]oh", desc = "Search high-lighting" },
|
||||||
},
|
{ "]oi", desc = "Case insensitive search" },
|
||||||
|
{ "]ol", desc = "List mode" },
|
||||||
|
{ "]on", desc = "Line numbers" },
|
||||||
|
{ "]op", "<cmd>lclose<CR>", desc = "Location list" },
|
||||||
|
{ "]oq", "<cmd>cclose<CR>", desc = "Quickfix list" },
|
||||||
|
{ "]or", desc = "Relative line numbers" },
|
||||||
|
{ "]ou", desc = "Cursor column" },
|
||||||
|
{ "]ov", desc = "Virtual editing" },
|
||||||
|
{ "]ow", desc = "Text wrapping" },
|
||||||
|
{ "]ox", desc = "Cursor line and column" },
|
||||||
|
{ "]oz", desc = "Spell checking" },
|
||||||
|
|
||||||
|
-- Toggle option
|
||||||
|
{ "yo", group = "Toggle option" },
|
||||||
|
{ "yob", desc = "Light background" },
|
||||||
|
{ "yoc", desc = "Cursor line" },
|
||||||
|
{ "yod", desc = "Diff" },
|
||||||
|
{ "yof", "<cmd>FormatToggle<CR>", desc = "LSP Formatting" },
|
||||||
|
{ "yoh", desc = "Search high-lighting" },
|
||||||
|
{ "yoi", desc = "Case insensitive search" },
|
||||||
|
{ "yol", desc = "List mode" },
|
||||||
|
{ "yon", desc = "Line numbers" },
|
||||||
|
{ "yop", "<Plug>(qf_loc_toggle)", desc = "Location list" },
|
||||||
|
{ "yoq", "<Plug>(qf_qf_toggle)", desc = "Quickfix list" },
|
||||||
|
{ "yor", desc = "Relative line numbers" },
|
||||||
|
{ "you", desc = "Cursor column" },
|
||||||
|
{ "yov", desc = "Virtual editing" },
|
||||||
|
{ "yow", desc = "Text wrapping" },
|
||||||
|
{ "yox", desc = "Cursor line and column" },
|
||||||
|
{ "yoz", desc = "Spell checking" },
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys)
|
wk.add(keys)
|
||||||
|
|
5
modules/home/vim/after/queries/diff/highlights.scm
Normal file
5
modules/home/vim/after/queries/diff/highlights.scm
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
; extends
|
||||||
|
|
||||||
|
; I want to the line added/removed markers to be the correct color
|
||||||
|
"+" @diff.plus
|
||||||
|
"-" @diff.minus
|
|
@ -46,14 +46,9 @@ in
|
||||||
vim-repeat # Enanche '.' for plugins
|
vim-repeat # Enanche '.' for plugins
|
||||||
vim-rsi # Readline mappings
|
vim-rsi # Readline mappings
|
||||||
vim-unimpaired # Some ex command mappings
|
vim-unimpaired # Some ex command mappings
|
||||||
vim-vinegar # Better netrw
|
|
||||||
|
|
||||||
# Languages
|
# Languages
|
||||||
rust-vim
|
|
||||||
vim-beancount
|
vim-beancount
|
||||||
vim-jsonnet
|
|
||||||
vim-nix
|
|
||||||
vim-toml
|
|
||||||
|
|
||||||
# General enhancements
|
# General enhancements
|
||||||
vim-qf # Better quick-fix list
|
vim-qf # Better quick-fix list
|
||||||
|
@ -85,6 +80,7 @@ in
|
||||||
dressing-nvim # Integrate native UI hooks with Telescope etc...
|
dressing-nvim # Integrate native UI hooks with Telescope etc...
|
||||||
gitsigns-nvim # Fast git UI integration
|
gitsigns-nvim # Fast git UI integration
|
||||||
nvim-surround # Deal with pairs, now in Lua
|
nvim-surround # Deal with pairs, now in Lua
|
||||||
|
oil-nvim # Better alternative to NetrW
|
||||||
telescope-fzf-native-nvim # Use 'fzf' fuzzy matching algorithm
|
telescope-fzf-native-nvim # Use 'fzf' fuzzy matching algorithm
|
||||||
telescope-lsp-handlers-nvim # Use 'telescope' for various LSP actions
|
telescope-lsp-handlers-nvim # Use 'telescope' for various LSP actions
|
||||||
telescope-nvim # Fuzzy finder interface
|
telescope-nvim # Fuzzy finder interface
|
||||||
|
@ -104,6 +100,9 @@ in
|
||||||
# Shell
|
# Shell
|
||||||
bash-language-server
|
bash-language-server
|
||||||
shfmt
|
shfmt
|
||||||
|
|
||||||
|
# Generic
|
||||||
|
typos-lsp
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
" Basic configuraion {{{
|
" Basic configuration {{{
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Use UTF-8
|
" Use UTF-8
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
|
@ -38,10 +38,10 @@ set tabstop=8
|
||||||
|
|
||||||
" File parameters {{{
|
" File parameters {{{
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Disable backups, we have source control for that
|
" Disable swap files
|
||||||
set nobackup
|
|
||||||
" Disable swapfiles too
|
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
" Enable undo files
|
||||||
|
set undofile
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" UI and UX parameters {{{
|
" UI and UX parameters {{{
|
||||||
|
@ -100,7 +100,13 @@ gruvbox.setup({
|
||||||
DiffChange = { fg = colors.aqua, bg = "NONE" },
|
DiffChange = { fg = colors.aqua, bg = "NONE" },
|
||||||
DiffDelete = { fg = colors.red, bg = "NONE" },
|
DiffDelete = { fg = colors.red, bg = "NONE" },
|
||||||
DiffText = { fg = colors.yellow, bg = colors.bg0 },
|
DiffText = { fg = colors.yellow, bg = colors.bg0 },
|
||||||
}
|
-- Directories "pop" better in blue
|
||||||
|
Directory = { link = "GruvboxBlueBold" },
|
||||||
|
},
|
||||||
|
italic = {
|
||||||
|
-- Comments should not be italic, for e.g: box drawing
|
||||||
|
comments = false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
EOF
|
EOF
|
||||||
" Use my preferred colorscheme
|
" Use my preferred colorscheme
|
||||||
|
|
|
@ -42,7 +42,7 @@ end
|
||||||
|
|
||||||
--- shared LSP configuration callback
|
--- shared LSP configuration callback
|
||||||
--- @param client native client configuration
|
--- @param client native client configuration
|
||||||
--- @param bufnr int? buffer number of the attched client
|
--- @param bufnr int? buffer number of the attached client
|
||||||
M.on_attach = function(client, bufnr)
|
M.on_attach = function(client, bufnr)
|
||||||
-- Format on save
|
-- Format on save
|
||||||
lsp_format.on_attach(client, bufnr)
|
lsp_format.on_attach(client, bufnr)
|
||||||
|
@ -87,31 +87,30 @@ M.on_attach = function(client, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
local keys = {
|
local keys = {
|
||||||
K = { vim.lsp.buf.hover, "Show symbol information" },
|
buffer = bufnr,
|
||||||
["<C-k>"] = { vim.lsp.buf.signature_help, "Show signature information" },
|
-- LSP navigation
|
||||||
["gd"] = { vim.lsp.buf.definition, "Go to definition" },
|
{ "K", vim.lsp.buf.hover, desc = "Show symbol information" },
|
||||||
["gD"] = { vim.lsp.buf.declaration, "Go to declaration" },
|
{ "<C-k>", vim.lsp.buf.signature_help, desc = "Show signature information" },
|
||||||
["gi"] = { vim.lsp.buf.implementation, "Go to implementation" },
|
{ "gd", vim.lsp.buf.definition, desc = "Go to definition" },
|
||||||
["gr"] = { vim.lsp.buf.references, "List all references" },
|
{ "gD", vim.lsp.buf.declaration, desc = "Go to declaration" },
|
||||||
|
{ "gi", vim.lsp.buf.implementation, desc = "Go to implementation" },
|
||||||
["<leader>c"] = {
|
{ "gr", vim.lsp.buf.references, desc = "List all references" },
|
||||||
name = "Code",
|
-- Code
|
||||||
a = { vim.lsp.buf.code_action, "Code actions" },
|
{ "<leader>c", group = "Code" },
|
||||||
d = { cycle_diagnostics_display, "Cycle diagnostics display" },
|
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code actions" },
|
||||||
D = { show_buffer_diagnostics, "Show buffer diagnostics" },
|
{ "<leader>cd", cycle_diagnostics_display, desc = "Cycle diagnostics display" },
|
||||||
r = { vim.lsp.buf.rename, "Rename symbol" },
|
{ "<leader>cD", show_buffer_diagnostics, desc = "Show buffer diagnostics" },
|
||||||
s = { vim.lsp.buf.signature_help, "Show signature" },
|
{ "<leader>cr", vim.lsp.buf.rename, desc = "Rename symbol" },
|
||||||
t = { vim.lsp.buf.type_definition, "Go to type definition" },
|
{ "<leader>cs", vim.lsp.buf.signature_help, desc = "Show signature" },
|
||||||
w = {
|
{ "<leader>ct", vim.lsp.buf.type_definition, desc = "Go to type definition" },
|
||||||
name = "Workspace",
|
-- Workspace
|
||||||
a = { vim.lsp.buf.add_workspace_folder, "Add folder to workspace" },
|
{ "<leader>cw", group = "Workspace" },
|
||||||
l = { list_workspace_folders, "List folders in workspace" },
|
{ "<leader>cwa", vim.lsp.buf.add_workspace_folder, desc = "Add folder to workspace" },
|
||||||
r = { vim.lsp.buf.remove_workspace_folder, "Remove folder from workspace" },
|
{ "<leader>cwl", list_workspace_folders, desc = "List folders in workspace" },
|
||||||
},
|
{ "<leader>cwr", vim.lsp.buf.remove_workspace_folder, desc = "Remove folder from workspace" },
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys, { buffer = bufnr })
|
wk.add(keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -48,4 +48,22 @@ M.list_lsp_clients = function(bufnr)
|
||||||
return names
|
return names
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- partially apply a function with given arguments
|
||||||
|
M.partial = function(f, ...)
|
||||||
|
local a = { ... }
|
||||||
|
local a_len = select("#", ...)
|
||||||
|
|
||||||
|
return function(...)
|
||||||
|
local tmp = { ... }
|
||||||
|
local tmp_len = select("#", ...)
|
||||||
|
|
||||||
|
-- Merge arg lists
|
||||||
|
for i = 1, tmp_len do
|
||||||
|
a[a_len + i] = tmp[i]
|
||||||
|
end
|
||||||
|
|
||||||
|
return f(unpack(a, 1, a_len + tmp_len))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -7,17 +7,28 @@ local numbertoggle = vim.api.nvim_create_augroup("numbertoggle", { clear = true
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
group = numbertoggle,
|
group = numbertoggle,
|
||||||
command = "if &nu | setlocal rnu | endif",
|
callback = function()
|
||||||
|
if vim.opt.number:get() then
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "InsertEnter", "WinLeave" }, {
|
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "InsertEnter", "WinLeave" }, {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
group = numbertoggle,
|
group = numbertoggle,
|
||||||
command = "if &nu | setlocal nornu | endif",
|
callback = function()
|
||||||
|
if vim.opt.number:get() then
|
||||||
|
vim.opt.relativenumber = false
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Never show the sign column in a terminal buffer
|
-- Never show the sign column in a terminal buffer
|
||||||
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
group = numbertoggle,
|
group = numbertoggle,
|
||||||
command = "setlocal nonu nornu",
|
callback = function()
|
||||||
|
vim.opt.number = false
|
||||||
|
vim.opt.relativenumber = false
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,58 +1,75 @@
|
||||||
local gitsigns = require("gitsigns")
|
local gitsigns = require("gitsigns")
|
||||||
|
local utils = require("ambroisie.utils")
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
|
--- Transform `f` into a function which acts on the current visual selection
|
||||||
|
local function make_visual(f)
|
||||||
|
return function()
|
||||||
|
local first = vim.fn.line("v")
|
||||||
|
local last = vim.fn.line(".")
|
||||||
|
f({ first, last })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function nav_hunk(dir)
|
||||||
|
if vim.wo.diff then
|
||||||
|
local map = {
|
||||||
|
prev = "[c",
|
||||||
|
next = "]c",
|
||||||
|
}
|
||||||
|
vim.cmd.normal({ map[dir], bang = true })
|
||||||
|
else
|
||||||
|
gitsigns.nav_hunk(dir)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
gitsigns.setup({
|
gitsigns.setup({
|
||||||
current_line_blame_opts = {
|
current_line_blame_opts = {
|
||||||
-- Show the blame quickly
|
-- Show the blame quickly
|
||||||
delay = 100,
|
delay = 100,
|
||||||
},
|
},
|
||||||
|
-- Work-around for https://github.com/lewis6991/gitsigns.nvim/issues/929
|
||||||
|
signs_staged_enable = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
local keys = {
|
local keys = {
|
||||||
-- Navigation
|
-- Navigation
|
||||||
["[c"] = { "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", "Previous hunk/diff", expr = true },
|
{ "[c", utils.partial(nav_hunk, "prev"), desc = "Previous hunk/diff" },
|
||||||
["]c"] = { "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", "Next hunk/diff", expr = true },
|
{ "]c", utils.partial(nav_hunk, "next"), desc = "Next hunk/diff" },
|
||||||
|
|
||||||
-- Commands
|
-- Commands
|
||||||
["<leader>g"] = {
|
{ "<leader>g", group = "Git" },
|
||||||
name = "Git",
|
{ "<leader>gb", gitsigns.toggle_current_line_blame, desc = "Toggle blame virtual text" },
|
||||||
-- Actions
|
{ "<leader>gd", gitsigns.diffthis, desc = "Diff buffer" },
|
||||||
b = { gitsigns.toggle_current_line_blame, "Toggle blame virtual text" },
|
{ "<leader>gD", utils.partial(gitsigns.diffthis, "~"), desc = "Diff buffer against last commit" },
|
||||||
d = { gitsigns.diffthis, "Diff buffer" },
|
{ "<leader>gg", "<cmd>Git<CR>", desc = "Git status" },
|
||||||
-- stylua: ignore
|
{ "<leader>gh", gitsigns.toggle_deleted, desc = "Show deleted hunks" },
|
||||||
D = { function() gitsigns.diffthis("~") end, "Diff buffer against last commit" },
|
{ "<leader>gL", "<cmd>:sp<CR><C-w>T:Gllog --follow -- %:p<CR>", desc = "Current buffer log" },
|
||||||
g = { "<cmd>Git<CR>", "Git status" },
|
{ "<leader>gm", "<Plug>(git-messenger)", desc = "Current line blame" },
|
||||||
h = { gitsigns.toggle_deleted, "Show deleted hunks" },
|
{ "<leader>gp", gitsigns.preview_hunk, desc = "Preview hunk" },
|
||||||
L = { "<cmd>:sp<CR><C-w>T:Gllog --follow -- %:p<CR>", "Current buffer log" },
|
{ "<leader>gr", gitsigns.reset_hunk, desc = "Restore hunk" },
|
||||||
m = { "<Plug>(git-messenger)", "Current line blame" },
|
{ "<leader>gR", gitsigns.reset_buffer, desc = "Restore buffer" },
|
||||||
p = { gitsigns.preview_hunk, "Preview hunk" },
|
{ "<leader>gs", gitsigns.stage_hunk, desc = "Stage hunk" },
|
||||||
r = { gitsigns.reset_hunk, "Restore hunk" },
|
{ "<leader>gS", gitsigns.stage_buffer, desc = "Stage buffer" },
|
||||||
R = { gitsigns.reset_buffer, "Restore buffer" },
|
{ "<leader>gu", gitsigns.undo_stage_hunk, desc = "Undo stage hunk" },
|
||||||
s = { gitsigns.stage_hunk, "Stage hunk" },
|
{ "<leader>g[", utils.partial(gitsigns.nav_hunk, "prev"), desc = "Previous hunk" },
|
||||||
S = { gitsigns.stage_buffer, "Stage buffer" },
|
{ "<leader>g]", utils.partial(gitsigns.nav_hunk, "next"), desc = "Next hunk" },
|
||||||
u = { gitsigns.undo_stage_hunk, "Undo stage hunk" },
|
|
||||||
["["] = { gitsigns.prev_hunk, "Previous hunk" },
|
|
||||||
["]"] = { gitsigns.next_hunk, "Next hunk" },
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local objects = {
|
local objects = {
|
||||||
["ih"] = { gitsigns.select_hunk, "Git hunk" },
|
mode = "o",
|
||||||
|
{ "ih", gitsigns.select_hunk, desc = "Git hunk" },
|
||||||
}
|
}
|
||||||
|
-- Visual
|
||||||
local visual = {
|
local visual = {
|
||||||
["ih"] = { gitsigns.select_hunk, "Git hunk" },
|
mode = { "x" },
|
||||||
|
{ "ih", gitsigns.select_hunk, desc = "Git hunk" },
|
||||||
-- Only the actual command can make use of the visual selection...
|
{ "<leader>g", group = "Git" },
|
||||||
["<leader>g"] = {
|
{ "<leader>gp", gitsigns.preview_hunk, desc = "Preview selection" },
|
||||||
name = "Git",
|
{ "<leader>gr", make_visual(gitsigns.reset_hunk), desc = "Restore selection" },
|
||||||
p = { ":Gitsigns preview_hunk<CR>", "Preview selection" },
|
{ "<leader>gs", make_visual(gitsigns.stage_hunk), desc = "Stage selection" },
|
||||||
r = { ":Gitsigns reset_hunk<CR>", "Restore selection" },
|
{ "<leader>gu", gitsigns.undo_stage_hunk, desc = "Undo stage selection" },
|
||||||
s = { ":Gitsigns stage_hunk<CR>", "Stage selection" },
|
|
||||||
u = { ":Gitsigns undo_stage_hunk<CR>", "Undo stage selection" },
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys, { buffer = bufnr })
|
wk.add(keys)
|
||||||
wk.register(objects, { buffer = bufnr, mode = "o" })
|
wk.add(objects)
|
||||||
wk.register(visual, { buffer = bufnr, mode = "x" })
|
wk.add(visual)
|
||||||
|
|
|
@ -84,3 +84,11 @@ if utils.is_executable("starpls") then
|
||||||
on_attach = lsp.on_attach,
|
on_attach = lsp.on_attach,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Generic
|
||||||
|
if utils.is_executable("typos-lsp") then
|
||||||
|
lspconfig.typos_lsp.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = lsp.on_attach,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
34
modules/home/vim/plugin/settings/oil.lua
Normal file
34
modules/home/vim/plugin/settings/oil.lua
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
local oil = require("oil")
|
||||||
|
local wk = require("which-key")
|
||||||
|
|
||||||
|
local detail = false
|
||||||
|
|
||||||
|
oil.setup({
|
||||||
|
view_options = {
|
||||||
|
-- Show files and directories that start with "." by default
|
||||||
|
show_hidden = true,
|
||||||
|
-- But never '..'
|
||||||
|
is_always_hidden = function(name, bufnr)
|
||||||
|
return name == ".."
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
["gd"] = {
|
||||||
|
desc = "Toggle file detail view",
|
||||||
|
callback = function()
|
||||||
|
detail = not detail
|
||||||
|
if detail then
|
||||||
|
oil.set_columns({ "icon", "permissions", "size", "mtime" })
|
||||||
|
else
|
||||||
|
oil.set_columns({ "icon" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local keys = {
|
||||||
|
{ "-", oil.open, desc = "Open parent directory" },
|
||||||
|
}
|
||||||
|
|
||||||
|
wk.add(keys)
|
|
@ -1,4 +1,6 @@
|
||||||
local telescope = require("telescope")
|
local telescope = require("telescope")
|
||||||
|
local telescope_builtin = require("telescope.builtin")
|
||||||
|
local wk = require("which-key")
|
||||||
|
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
|
@ -22,3 +24,14 @@ telescope.setup({
|
||||||
|
|
||||||
telescope.load_extension("fzf")
|
telescope.load_extension("fzf")
|
||||||
telescope.load_extension("lsp_handlers")
|
telescope.load_extension("lsp_handlers")
|
||||||
|
|
||||||
|
local keys = {
|
||||||
|
{ "<leader>f", group = "Fuzzy finder" },
|
||||||
|
{ "<leader>fb", telescope_builtin.buffers, desc = "Open buffers" },
|
||||||
|
{ "<leader>ff", telescope_builtin.git_files, desc = "Git tracked files" },
|
||||||
|
{ "<leader>fF", telescope_builtin.find_files, desc = "Files" },
|
||||||
|
{ "<leader>fg", telescope_builtin.live_grep, desc = "Grep string" },
|
||||||
|
{ "<leader>fG", telescope_builtin.grep_string, desc = "Grep string under cursor" },
|
||||||
|
}
|
||||||
|
|
||||||
|
wk.add(keys)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
local ts_config = require("nvim-treesitter.configs")
|
local ts_config = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
ts_config.setup({
|
ts_config.setup({
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -14,16 +15,16 @@ ts_config.setup({
|
||||||
-- Jump to matching text objects
|
-- Jump to matching text objects
|
||||||
lookahead = true,
|
lookahead = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["aa"] = "@parameter.outer",
|
["aa"] = { query = "@parameter.outer", desc = "a parameter" },
|
||||||
["ia"] = "@parameter.inner",
|
["ia"] = { query = "@parameter.inner", desc = "inner parameter" },
|
||||||
["ab"] = "@block.outer",
|
["ab"] = { query = "@block.outer", desc = "a block" },
|
||||||
["ib"] = "@block.inner",
|
["ib"] = { query = "@block.inner", desc = "inner block" },
|
||||||
["ac"] = "@class.outer",
|
["ac"] = { query = "@class.outer", desc = "a class" },
|
||||||
["ic"] = "@class.inner",
|
["ic"] = { query = "@class.inner", desc = "inner class" },
|
||||||
["af"] = "@function.outer",
|
["af"] = { query = "@function.outer", desc = "a function" },
|
||||||
["if"] = "@function.inner",
|
["if"] = { query = "@function.inner", desc = "inner function" },
|
||||||
["ak"] = "@comment.outer",
|
["ak"] = { query = "@comment.outer", desc = "a comment" },
|
||||||
["aS"] = "@statement.outer",
|
["aS"] = { query = "@statement.outer", desc = "a statement" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
move = {
|
move = {
|
||||||
|
@ -31,22 +32,22 @@ ts_config.setup({
|
||||||
-- Add to jump list
|
-- Add to jump list
|
||||||
set_jumps = true,
|
set_jumps = true,
|
||||||
goto_next_start = {
|
goto_next_start = {
|
||||||
["]m"] = "@function.outer",
|
["]m"] = { query = "@function.outer", desc = "Next method start" },
|
||||||
["]S"] = "@statement.outer",
|
["]S"] = { query = "@statement.outer", desc = "Next statement start" },
|
||||||
["]]"] = "@class.outer",
|
["]]"] = { query = "@class.outer", desc = "Next class start" },
|
||||||
},
|
},
|
||||||
goto_next_end = {
|
goto_next_end = {
|
||||||
["]M"] = "@function.outer",
|
["]M"] = { query = "@function.outer", desc = "Next method end" },
|
||||||
["]["] = "@class.outer",
|
["]["] = { query = "@class.outer", desc = "Next class end" },
|
||||||
},
|
},
|
||||||
goto_previous_start = {
|
goto_previous_start = {
|
||||||
["[m"] = "@function.outer",
|
["[m"] = { query = "@function.outer", desc = "Previous method start" },
|
||||||
["[S"] = "@statement.outer",
|
["[S"] = { query = "@statement.outer", desc = "Previous statement start" },
|
||||||
["[["] = "@class.outer",
|
["[["] = { query = "@class.outer", desc = "Previous class start" },
|
||||||
},
|
},
|
||||||
goto_previous_end = {
|
goto_previous_end = {
|
||||||
["[M"] = "@function.outer",
|
["[M"] = { query = "@function.outer", desc = "Previous method end" },
|
||||||
["[]"] = "@class.outer",
|
["[]"] = { query = "@class.outer", desc = "Previous class end" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,2 +1,33 @@
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.setup()
|
wk.setup({
|
||||||
|
icons = {
|
||||||
|
-- I don't like icons
|
||||||
|
mappings = false,
|
||||||
|
breadcrumb = "»",
|
||||||
|
separator = "➜",
|
||||||
|
group = "+",
|
||||||
|
ellipsis = "…",
|
||||||
|
keys = {
|
||||||
|
Up = " ",
|
||||||
|
Down = " ",
|
||||||
|
Left = " ",
|
||||||
|
Right = " ",
|
||||||
|
C = "<C>",
|
||||||
|
M = "<M>",
|
||||||
|
D = "<D>",
|
||||||
|
S = "<S>",
|
||||||
|
CR = "<CR>",
|
||||||
|
Esc = "<Esc> ",
|
||||||
|
NL = "<NL>",
|
||||||
|
BS = "<BS>",
|
||||||
|
Space = "<space>",
|
||||||
|
Tab = "<Tab> ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local keys = {
|
||||||
|
{ "<leader><leader>", vim.cmd.nohlsearch, desc = "Clear search highlight" },
|
||||||
|
}
|
||||||
|
|
||||||
|
wk.add(keys)
|
||||||
|
|
|
@ -4,17 +4,23 @@ local signtoggle = vim.api.nvim_create_augroup("signtoggle", { clear = true })
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "WinEnter" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "WinEnter" }, {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
group = signtoggle,
|
group = signtoggle,
|
||||||
command = "setlocal signcolumn=yes",
|
callback = function()
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "WinLeave" }, {
|
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "WinLeave" }, {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
group = signtoggle,
|
group = signtoggle,
|
||||||
command = "setlocal signcolumn=yes",
|
callback = function()
|
||||||
|
vim.opt.signcolumn = "no"
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Never show the sign column in a terminal buffer
|
-- Never show the sign column in a terminal buffer
|
||||||
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
group = signtoggle,
|
group = signtoggle,
|
||||||
command = "setlocal signcolumn=no",
|
callback = function()
|
||||||
|
vim.opt.signcolumn = "no"
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,7 +20,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."wgetrc".text = ''
|
xdg.configFile."wgetrc".text = ''
|
||||||
hsts-file = ${config.xdg.dataHome}/wget-hsts
|
hsts-file = ${config.xdg.stateHome}/wget-hsts
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ in
|
||||||
service = "some-service-name";
|
service = "some-service-name";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
description = "list of block configurations, merged with the defauls";
|
description = "list of block configurations, merged with the defaults";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -371,8 +371,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
startup = [
|
startup = [
|
||||||
# FIXME
|
# NOTE: rely on systemd user services instead...
|
||||||
# { commdand; always; notification; }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
window = {
|
window = {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
let
|
let
|
||||||
cfg = config.my.home.wm.screen-lock;
|
cfg = config.my.home.wm.screen-lock;
|
||||||
|
|
||||||
notficationCmd =
|
notificationCmd =
|
||||||
let
|
let
|
||||||
duration = toString (cfg.notify.delay * 1000);
|
duration = toString (cfg.notify.delay * 1000);
|
||||||
notifyCmd = "${lib.getExe pkgs.libnotify} -u critical -t ${duration}";
|
notifyCmd = "${lib.getExe pkgs.libnotify} -u critical -t ${duration}";
|
||||||
|
@ -48,7 +48,7 @@ in
|
||||||
"-notify"
|
"-notify"
|
||||||
"${toString cfg.notify.delay}"
|
"${toString cfg.notify.delay}"
|
||||||
"-notifier"
|
"-notifier"
|
||||||
notficationCmd
|
notificationCmd
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
# File types
|
# File types
|
||||||
mime.enable = true;
|
mime.enable = true;
|
||||||
# File associatons
|
# File associations
|
||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -34,6 +34,9 @@ in
|
||||||
"gdb/.keep".text = "";
|
"gdb/.keep".text = "";
|
||||||
"tig/.keep".text = "";
|
"tig/.keep".text = "";
|
||||||
};
|
};
|
||||||
|
stateFile = {
|
||||||
|
"python/.keep".text = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# I want a tidier home
|
# I want a tidier home
|
||||||
|
@ -43,13 +46,13 @@ in
|
||||||
CARGO_HOME = "${dataHome}/cargo";
|
CARGO_HOME = "${dataHome}/cargo";
|
||||||
DOCKER_CONFIG = "${configHome}/docker";
|
DOCKER_CONFIG = "${configHome}/docker";
|
||||||
GRADLE_USER_HOME = "${dataHome}/gradle";
|
GRADLE_USER_HOME = "${dataHome}/gradle";
|
||||||
HISTFILE = "${dataHome}/bash/history";
|
HISTFILE = "${stateHome}/bash/history";
|
||||||
INPUTRC = "${configHome}/readline/inputrc";
|
INPUTRC = "${configHome}/readline/inputrc";
|
||||||
PSQL_HISTORY = "${dataHome}/psql_history";
|
PSQL_HISTORY = "${stateHome}/psql_history";
|
||||||
PYTHONPYCACHEPREFIX = "${cacheHome}/python/";
|
PYTHONPYCACHEPREFIX = "${cacheHome}/python/";
|
||||||
PYTHONUSERBASE = "${dataHome}/python/";
|
PYTHONUSERBASE = "${dataHome}/python/";
|
||||||
PYTHON_HISTORY = "${stateHome}/python/history";
|
PYTHON_HISTORY = "${stateHome}/python/history";
|
||||||
REDISCLI_HISTFILE = "${dataHome}/redis/rediscli_history";
|
REDISCLI_HISTFILE = "${stateHome}/redis/rediscli_history";
|
||||||
REPO_CONFIG_DIR = "${configHome}/repo";
|
REPO_CONFIG_DIR = "${configHome}/repo";
|
||||||
XCOMPOSECACHE = "${dataHome}/X11/xcompose";
|
XCOMPOSECACHE = "${dataHome}/X11/xcompose";
|
||||||
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${configHome}/java";
|
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${configHome}/java";
|
||||||
|
|
|
@ -68,7 +68,7 @@ in
|
||||||
ignoreSpace = true;
|
ignoreSpace = true;
|
||||||
ignoreDups = true;
|
ignoreDups = true;
|
||||||
share = false;
|
share = false;
|
||||||
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
path = "${config.xdg.stateHome}/zsh/zsh_history";
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
|
|
|
@ -12,7 +12,7 @@ setopt rc_quotes
|
||||||
setopt auto_resume
|
setopt auto_resume
|
||||||
# Show history expansion before running a command
|
# Show history expansion before running a command
|
||||||
setopt hist_verify
|
setopt hist_verify
|
||||||
# Append commands to history as they are exectuted
|
# Append commands to history as they are executed
|
||||||
setopt inc_append_history_time
|
setopt inc_append_history_time
|
||||||
# Remove useless whitespace from commands
|
# Remove useless whitespace from commands
|
||||||
setopt hist_reduce_blanks
|
setopt hist_reduce_blanks
|
||||||
|
|
|
@ -18,6 +18,13 @@ in
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Persist bluetooth files
|
||||||
|
{
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/bluetooth"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
# Support for additional bluetooth codecs
|
# Support for additional bluetooth codecs
|
||||||
(lib.mkIf cfg.loadExtraCodecs {
|
(lib.mkIf cfg.loadExtraCodecs {
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
|
|
|
@ -22,6 +22,11 @@ in
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
(lib.mkIf cfg.wireless.enable {
|
(lib.mkIf cfg.wireless.enable {
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Persist NetworkManager files
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/etc/NetworkManager/system-connections"
|
||||||
|
];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
# This section must be *after* the one configured by `libinput`
|
# This section must be *after* the one configured by `libinput`
|
||||||
# for the `ScrollMethod` configuration to not be overriden
|
# for the `ScrollMethod` configuration to not be overridden
|
||||||
inputClassSections = lib.mkAfter [
|
inputClassSections = lib.mkAfter [
|
||||||
# MX Ergo
|
# MX Ergo
|
||||||
''
|
''
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Configuration that spans accross system and home, or are almagations of modules
|
# Configuration that spans across system and home, or are almagations of modules
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -71,6 +71,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: persistence?
|
||||||
|
|
||||||
# NOTE: unfortunately aria2 does not log connection failures for fail2ban
|
# NOTE: unfortunately aria2 does not log connection failures for fail2ban
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,5 +35,23 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: persistence?
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
audiobookshelf = ''
|
||||||
|
enabled = true
|
||||||
|
filter = audiobookshelf
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/audiobookshelf.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^.*ERROR: \[Auth\] Failed login attempt for username ".*" from ip <ADDR>
|
||||||
|
journalmatch = _SYSTEMD_UNIT=audiobookshelf.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,5 +41,12 @@ in
|
||||||
|
|
||||||
# Those are all subdomains, no problem
|
# Those are all subdomains, no problem
|
||||||
my.services.nginx.virtualHosts = hostsInfo;
|
my.services.nginx.virtualHosts = hostsInfo;
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/www/blog"
|
||||||
|
"/var/www/cv"
|
||||||
|
"/var/www/dev"
|
||||||
|
"/var/www/key"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,11 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/${config.services.calibre-web.dataDir}"
|
||||||
|
cfg.libraryPath
|
||||||
|
];
|
||||||
|
|
||||||
services.fail2ban.jails = {
|
services.fail2ban.jails = {
|
||||||
calibre-web = ''
|
calibre-web = ''
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
./grocy
|
./grocy
|
||||||
./indexers
|
./indexers
|
||||||
./jellyfin
|
./jellyfin
|
||||||
|
./komga
|
||||||
./lohr
|
./lohr
|
||||||
./matrix
|
./matrix
|
||||||
./mealie
|
./mealie
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
./nginx
|
./nginx
|
||||||
./nix-cache
|
./nix-cache
|
||||||
./paperless
|
./paperless
|
||||||
./pirate
|
./pdf-edit
|
||||||
./podgrab
|
./podgrab
|
||||||
./postgresql
|
./postgresql
|
||||||
./postgresql-backup
|
./postgresql-backup
|
||||||
|
@ -34,6 +35,7 @@
|
||||||
./quassel
|
./quassel
|
||||||
./rss-bridge
|
./rss-bridge
|
||||||
./sabnzbd
|
./sabnzbd
|
||||||
|
./servarr
|
||||||
./ssh-server
|
./ssh-server
|
||||||
./tandoor-recipes
|
./tandoor-recipes
|
||||||
./tlp
|
./tlp
|
||||||
|
|
|
@ -27,5 +27,9 @@ in
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: persistence?
|
||||||
|
|
||||||
|
# NOTE: unfortunately flood does not log connection failures for fail2ban
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# A low-ressource, full-featured git forge.
|
# A low-resource, full-featured git forge.
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.services.forgejo;
|
cfg = config.my.services.forgejo;
|
||||||
|
@ -147,6 +147,11 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.gitea.lfs.contentDir
|
||||||
|
config.services.gitea.repositoryRoot
|
||||||
|
];
|
||||||
|
|
||||||
services.fail2ban.jails = {
|
services.fail2ban.jails = {
|
||||||
forgejo = ''
|
forgejo = ''
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# A low-ressource, full-featured git forge.
|
# A low-resource, full-featured git forge.
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.services.gitea;
|
cfg = config.my.services.gitea;
|
||||||
|
@ -131,6 +131,11 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.gitea.lfs.contentDir
|
||||||
|
config.services.gitea.repositoryRoot
|
||||||
|
];
|
||||||
|
|
||||||
services.fail2ban.jails = {
|
services.fail2ban.jails = {
|
||||||
gitea = ''
|
gitea = ''
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -36,5 +36,10 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = config.networking.domain;
|
useACMEHost = config.networking.domain;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: backup
|
||||||
|
# FIXME: persistence
|
||||||
|
|
||||||
|
# NOTE: unfortunately grocy does not log connection failures for fail2ban
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,10 @@ in
|
||||||
port = jackettPort;
|
port = jackettPort;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.jackett.dataDir
|
||||||
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
(lib.mkIf cfg.nzbhydra.enable {
|
(lib.mkIf cfg.nzbhydra.enable {
|
||||||
|
@ -45,6 +49,10 @@ in
|
||||||
port = nzbhydraPort;
|
port = nzbhydraPort;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.nzbhydra2.dataDir
|
||||||
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
(lib.mkIf cfg.prowlarr.enable {
|
(lib.mkIf cfg.prowlarr.enable {
|
||||||
|
@ -58,6 +66,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/${config.systemd.services.prowlarr.serviceConfig.StateDirectory}"
|
||||||
|
];
|
||||||
|
|
||||||
services.fail2ban.jails = {
|
services.fail2ban.jails = {
|
||||||
prowlarr = ''
|
prowlarr = ''
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -41,5 +41,25 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/${config.systemd.services.jellyfin.serviceConfig.StateDirectory}"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
jellyfin = ''
|
||||||
|
enabled = true
|
||||||
|
filter = jellyfin
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/jellyfin.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^.*Authentication request for .* has been denied \(IP: "?<ADDR>"?\)\.
|
||||||
|
journalmatch = _SYSTEMD_UNIT=jellyfin.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
55
modules/nixos/services/komga/default.nix
Normal file
55
modules/nixos/services/komga/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# A Comics/Manga media server
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.services.komga;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.services.komga = with lib; {
|
||||||
|
enable = mkEnableOption "Komga comics server";
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 4584;
|
||||||
|
example = 8080;
|
||||||
|
description = "Internal port for webui";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.komga = {
|
||||||
|
enable = true;
|
||||||
|
inherit (cfg) port;
|
||||||
|
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.komga.environment = {
|
||||||
|
LOGGING_LEVEL_ORG_GOTSON_KOMGA = "DEBUG"; # Needed for fail2ban
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set-up media group
|
||||||
|
users.groups.media = { };
|
||||||
|
|
||||||
|
my.services.nginx.virtualHosts = {
|
||||||
|
komga = {
|
||||||
|
inherit (cfg) port;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
komga = ''
|
||||||
|
enabled = true
|
||||||
|
filter = komga
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/komga.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^.* ip=<HOST>,.*Bad credentials.*$
|
||||||
|
journalmatch = _SYSTEMD_UNIT=komga.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -107,5 +107,9 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/${config.systemd.services.lohr.serviceConfig.StateDirectory}"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,21 +26,6 @@ in
|
||||||
description = "Shared secret to register users";
|
description = "Shared secret to register users";
|
||||||
};
|
};
|
||||||
|
|
||||||
slidingSync = {
|
|
||||||
port = mkOption {
|
|
||||||
type = types.port;
|
|
||||||
default = 8009;
|
|
||||||
example = 8084;
|
|
||||||
description = "Port used by sliding sync server";
|
|
||||||
};
|
|
||||||
|
|
||||||
secretFile = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
example = "/var/lib/matrix/sliding-sync-secret-file.env";
|
|
||||||
description = "Secret file which contains SYNCV3_SECRET definition";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
mailConfigFile = mkOption {
|
mailConfigFile = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = "/var/lib/matrix/email-config.yaml";
|
example = "/var/lib/matrix/email-config.yaml";
|
||||||
|
@ -106,17 +91,6 @@ in
|
||||||
] ++ lib.optional (cfg.secretFile != null) cfg.secretFile;
|
] ++ lib.optional (cfg.secretFile != null) cfg.secretFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.matrix-sliding-sync = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
SYNCV3_SERVER = "https://${matrixDomain}";
|
|
||||||
SYNCV3_BINDADDR = "127.0.0.1:${toString cfg.slidingSync.port}";
|
|
||||||
};
|
|
||||||
|
|
||||||
environmentFile = cfg.slidingSync.secretFile;
|
|
||||||
};
|
|
||||||
|
|
||||||
my.services.nginx.virtualHosts = {
|
my.services.nginx.virtualHosts = {
|
||||||
# Element Web app deployment
|
# Element Web app deployment
|
||||||
chat = {
|
chat = {
|
||||||
|
@ -130,9 +104,6 @@ in
|
||||||
"m.identity_server" = {
|
"m.identity_server" = {
|
||||||
"base_url" = "https://vector.im";
|
"base_url" = "https://vector.im";
|
||||||
};
|
};
|
||||||
"org.matrix.msc3575.proxy" = {
|
|
||||||
"url" = "https://matrix-sync.${domain}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
showLabsSettings = true;
|
showLabsSettings = true;
|
||||||
defaultCountryCode = "FR"; # cocorico
|
defaultCountryCode = "FR"; # cocorico
|
||||||
|
@ -152,10 +123,6 @@ in
|
||||||
matrix-client = {
|
matrix-client = {
|
||||||
port = clientPort.private;
|
port = clientPort.private;
|
||||||
};
|
};
|
||||||
# Sliding sync
|
|
||||||
matrix-sync = {
|
|
||||||
inherit (cfg.slidingSync) port;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Those are too complicated to use my wrapper...
|
# Those are too complicated to use my wrapper...
|
||||||
|
@ -178,11 +145,6 @@ in
|
||||||
|
|
||||||
"/_matrix" = proxyToClientPort;
|
"/_matrix" = proxyToClientPort;
|
||||||
"/_synapse/client" = proxyToClientPort;
|
"/_synapse/client" = proxyToClientPort;
|
||||||
|
|
||||||
# Sliding sync
|
|
||||||
"~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)" = {
|
|
||||||
proxyPass = "http://${config.services.matrix-sliding-sync.settings.SYNCV3_BINDADDR}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
listen = [
|
listen = [
|
||||||
|
@ -228,7 +190,6 @@ in
|
||||||
client = {
|
client = {
|
||||||
"m.homeserver" = { "base_url" = "https://${matrixDomain}"; };
|
"m.homeserver" = { "base_url" = "https://${matrixDomain}"; };
|
||||||
"m.identity_server" = { "base_url" = "https://vector.im"; };
|
"m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||||
"org.matrix.msc3575.proxy" = { "url" = "https://matrix-sync.${domain}"; };
|
|
||||||
};
|
};
|
||||||
# ACAO required to allow element-web on any URL to request this json file
|
# ACAO required to allow element-web on any URL to request this json file
|
||||||
in
|
in
|
||||||
|
@ -253,5 +214,9 @@ in
|
||||||
config.services.matrix-synapse.dataDir
|
config.services.matrix-synapse.dataDir
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.matrix-synapse.dataDir
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,5 +71,24 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: backup
|
||||||
|
# FIXME: persistence
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
mealie = ''
|
||||||
|
enabled = true
|
||||||
|
filter = mealie
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/mealie.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^.*ERROR.*Incorrect username or password from <HOST>
|
||||||
|
journalmatch = _SYSTEMD_UNIT=mealie.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,5 +48,24 @@ in
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: backup
|
||||||
|
# FIXME: persistence
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
miniflux = ''
|
||||||
|
enabled = true
|
||||||
|
filter = miniflux
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/miniflux.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^.*msg="[^"]*(Incorrect|Invalid) username or password[^"]*".*client_ip=<ADDR>
|
||||||
|
journalmatch = _SYSTEMD_UNIT=miniflux.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,5 +130,10 @@ in
|
||||||
inherit (cfg.grafana) port;
|
inherit (cfg.grafana) port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.grafana.dataDir
|
||||||
|
"/var/lib/${config.services.prometheus.stateDir}"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,5 +52,25 @@ in
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/${config.systemd.services.navidrome.serviceConfig.StateDirectory}"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
navidrome = ''
|
||||||
|
enabled = true
|
||||||
|
filter = navidrome
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/navidrome.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^.*msg="Unsuccessful login".*X-Real-Ip:\[<HOST>\]
|
||||||
|
journalmatch = _SYSTEMD_UNIT=navidrome.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud29;
|
package = pkgs.nextcloud30;
|
||||||
hostName = "nextcloud.${config.networking.domain}";
|
hostName = "nextcloud.${config.networking.domain}";
|
||||||
home = "/var/lib/nextcloud";
|
home = "/var/lib/nextcloud";
|
||||||
maxUploadSize = cfg.maxSize;
|
maxUploadSize = cfg.maxSize;
|
||||||
|
@ -87,5 +87,30 @@ in
|
||||||
"${config.services.nextcloud.home}/data/appdata_*/preview"
|
"${config.services.nextcloud.home}/data/appdata_*/preview"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.nextcloud.home
|
||||||
|
config.services.nextcloud.datadir
|
||||||
|
];
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
nextcloud = ''
|
||||||
|
enabled = true
|
||||||
|
filter = nextcloud
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/nextcloud.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
_groupsre = (?:(?:,?\s*"\w+":(?:"[^"]+"|\w+))*)
|
||||||
|
datepattern = ,?\s*"time"\s*:\s*"%%Y-%%m-%%d[T ]%%H:%%M:%%S(%%z)?"
|
||||||
|
failregex = ^[^{]*\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Login failed:
|
||||||
|
^[^{]*\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Trusted domain error.
|
||||||
|
^[^{]*\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Two-factor challenge failed:
|
||||||
|
journalmatch = _SYSTEMD_UNIT=phpfpm-nextcloud.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,14 +59,12 @@ let
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.attrs; # FIXME: forward type of virtualHosts
|
type = types.attrs; # FIXME: forward type of virtualHosts
|
||||||
example = litteralExample ''
|
example = {
|
||||||
{
|
locations."/socket" = {
|
||||||
locations."/socket" = {
|
proxyPass = "http://127.0.0.1:8096/";
|
||||||
proxyPass = "http://127.0.0.1:8096/";
|
proxyWebsockets = true;
|
||||||
proxyWebsockets = true;
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
'';
|
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Any extra configuration that should be applied to this virtual host.
|
Any extra configuration that should be applied to this virtual host.
|
||||||
|
@ -100,26 +98,24 @@ in
|
||||||
virtualHosts = mkOption {
|
virtualHosts = mkOption {
|
||||||
type = types.attrsOf virtualHostOption;
|
type = types.attrsOf virtualHostOption;
|
||||||
default = { };
|
default = { };
|
||||||
example = litteralExample ''
|
example = {
|
||||||
{
|
gitea = {
|
||||||
gitea = {
|
subdomain = "git";
|
||||||
subdomain = "git";
|
port = 8080;
|
||||||
port = 8080;
|
};
|
||||||
};
|
dev = {
|
||||||
dev = {
|
root = "/var/www/dev";
|
||||||
root = "/var/www/dev";
|
};
|
||||||
};
|
jellyfin = {
|
||||||
jellyfin = {
|
port = 8096;
|
||||||
port = 8096;
|
extraConfig = {
|
||||||
extraConfig = {
|
locations."/socket" = {
|
||||||
locations."/socket" = {
|
proxyPass = "http://127.0.0.1:8096/";
|
||||||
proxyPass = "http://127.0.0.1:8096/";
|
proxyWebsockets = true;
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
'';
|
};
|
||||||
description = ''
|
description = ''
|
||||||
List of virtual hosts to set-up using default settings.
|
List of virtual hosts to set-up using default settings.
|
||||||
'';
|
'';
|
||||||
|
@ -163,25 +159,21 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
example = litteralExample ''
|
example = {
|
||||||
{
|
alice = {
|
||||||
alice = {
|
passwordHashFile = "/var/lib/nginx-sso/alice/password-hash.txt";
|
||||||
passwordHashFile = "/var/lib/nginx-sso/alice/password-hash.txt";
|
totpSecretFile = "/var/lib/nginx-sso/alice/totp-secret.txt";
|
||||||
totpSecretFile = "/var/lib/nginx-sso/alice/totp-secret.txt";
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = "Definition of users";
|
description = "Definition of users";
|
||||||
};
|
};
|
||||||
|
|
||||||
groups = mkOption {
|
groups = mkOption {
|
||||||
type = with types; attrsOf (listOf str);
|
type = with types; attrsOf (listOf str);
|
||||||
example = litteralExample ''
|
example = {
|
||||||
{
|
root = [ "alice" ];
|
||||||
root = [ "alice" ];
|
users = [ "alice" "bob" ];
|
||||||
users = [ "alice" "bob" ];
|
};
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = "Groups of users";
|
description = "Groups of users";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -465,5 +457,9 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.users.user.acme.home
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,15 +59,10 @@ in
|
||||||
StateDirectory = "nginx-sso";
|
StateDirectory = "nginx-sso";
|
||||||
WorkingDirectory = "/var/lib/nginx-sso";
|
WorkingDirectory = "/var/lib/nginx-sso";
|
||||||
# The files to be merged might not have the correct permissions
|
# The files to be merged might not have the correct permissions
|
||||||
ExecStartPre = ''+${pkgs.writeShellScript "merge-nginx-sso-config" ''
|
ExecStartPre = pkgs.writeShellScript "merge-nginx-sso-config" ''
|
||||||
rm -f '${confPath}'
|
rm -f '${confPath}'
|
||||||
${utils.genJqSecretsReplacementSnippet cfg.configuration confPath}
|
${utils.genJqSecretsReplacementSnippet cfg.configuration confPath}
|
||||||
|
'';
|
||||||
# Fix permissions
|
|
||||||
chown nginx-sso:nginx-sso ${confPath}
|
|
||||||
chmod 0600 ${confPath}
|
|
||||||
''
|
|
||||||
}'';
|
|
||||||
ExecStart = lib.mkForce ''
|
ExecStart = lib.mkForce ''
|
||||||
${lib.getExe pkg} \
|
${lib.getExe pkg} \
|
||||||
--config ${confPath} \
|
--config ${confPath} \
|
||||||
|
|
|
@ -40,7 +40,7 @@ in
|
||||||
inherit (cfg) priority;
|
inherit (cfg) priority;
|
||||||
};
|
};
|
||||||
|
|
||||||
signKeyPath = cfg.secretKeyFile;
|
signKeyPaths = [ cfg.secretKeyFile ];
|
||||||
};
|
};
|
||||||
|
|
||||||
my.services.nginx.virtualHosts = {
|
my.services.nginx.virtualHosts = {
|
||||||
|
|
|
@ -166,5 +166,10 @@ in
|
||||||
config.services.paperless.mediaDir
|
config.services.paperless.mediaDir
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.paperless-ng.dataDir
|
||||||
|
config.services.paperless-ng.mediaDir
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
73
modules/nixos/services/pdf-edit/default.nix
Normal file
73
modules/nixos/services/pdf-edit/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.services.pdf-edit;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.services.pdf-edit = with lib; {
|
||||||
|
enable = mkEnableOption "PDF edition service";
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 8089;
|
||||||
|
example = 8080;
|
||||||
|
description = "Internal port for webui";
|
||||||
|
};
|
||||||
|
|
||||||
|
loginFile = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
example = "/run/secrets/pdf-edit/login.env";
|
||||||
|
description = ''
|
||||||
|
`SECURITY_INITIALLOGIN_USERNAME` and `SECURITY_INITIALLOGIN_PASSWORD`
|
||||||
|
defined in the format of 'EnvironmentFile' (see `systemd.exec(5)`).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.stirling-pdf = lib.mkIf cfg.enable {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
SERVER_PORT = cfg.port;
|
||||||
|
SECURITY_CSRFDISABLED = "false";
|
||||||
|
|
||||||
|
SYSTEM_SHOWUPDATE = "false"; # We don't care about update notifications
|
||||||
|
INSTALL_BOOK_AND_ADVANCED_HTML_OPS = "true"; # Installed by the module
|
||||||
|
|
||||||
|
SECURITY_ENABLELOGIN = "true";
|
||||||
|
SECURITY_LOGINATTEMPTCOUNT = "-1"; # Rely on fail2ban instead
|
||||||
|
};
|
||||||
|
|
||||||
|
environmentFiles = [ cfg.loginFile ];
|
||||||
|
};
|
||||||
|
|
||||||
|
my.services.nginx.virtualHosts = {
|
||||||
|
pdf-edit = {
|
||||||
|
inherit (cfg) port;
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
# Allow upload of PDF files up to 1G
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
client_max_body_size 1G;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
stirling-pdf = ''
|
||||||
|
enabled = true
|
||||||
|
filter = stirling-pdf
|
||||||
|
port = http,https
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/stirling-pdf.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^.*Failed login attempt from IP: <HOST>$
|
||||||
|
journalmatch = _SYSTEMD_UNIT=stirling-pdf.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -13,7 +13,7 @@ in
|
||||||
example = "/run/secrets/password.env";
|
example = "/run/secrets/password.env";
|
||||||
description = ''
|
description = ''
|
||||||
The path to a file containing the PASSWORD environment variable
|
The path to a file containing the PASSWORD environment variable
|
||||||
definition for Podgrab's authentification.
|
definition for Podgrab's authentication.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,5 +51,10 @@ in
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.systemd.services.podgrab.environment.CONFIG
|
||||||
|
config.systemd.services.podgrab.environment.DATA
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,5 +24,9 @@ in
|
||||||
(config.services.postgresqlBackup.location + "/*.prev.sql.gz")
|
(config.services.postgresqlBackup.location + "/*.prev.sql.gz")
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.postgresqlBackup.location
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,13 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Only persist directory if the actual service is enabled
|
||||||
|
(lib.mkIf config.services.postgresql.enable {
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.postgresql.dataDir
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
||||||
# Taken from the manual
|
# Taken from the manual
|
||||||
(lib.mkIf cfg.upgradeScript {
|
(lib.mkIf cfg.upgradeScript {
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
|
|
|
@ -53,6 +53,9 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: backup
|
||||||
|
# FIXME: persistence
|
||||||
|
|
||||||
# FIXME: fail2ban
|
# FIXME: fail2ban
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,5 +46,9 @@ in
|
||||||
# Because Quassel does not use the socket, I simply trust its connection
|
# Because Quassel does not use the socket, I simply trust its connection
|
||||||
authentication = "host quassel quassel localhost trust";
|
authentication = "host quassel quassel localhost trust";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.quassel.dataDir
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,9 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = config.networking.domain;
|
useACMEHost = config.networking.domain;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.rss-bridge.dataDir
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.files = [
|
||||||
|
config.services.sabnzbd.configFile
|
||||||
|
];
|
||||||
|
|
||||||
services.fail2ban.jails = {
|
services.fail2ban.jails = {
|
||||||
sabnzbd = ''
|
sabnzbd = ''
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -4,12 +4,13 @@
|
||||||
# [1]: https://youtu.be/I26Ql-uX6AM
|
# [1]: https://youtu.be/I26Ql-uX6AM
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.services.pirate;
|
cfg = config.my.services.servarr;
|
||||||
|
|
||||||
ports = {
|
ports = {
|
||||||
bazarr = 6767;
|
bazarr = 6767;
|
||||||
lidarr = 8686;
|
lidarr = 8686;
|
||||||
radarr = 7878;
|
radarr = 7878;
|
||||||
|
readarr = 8787;
|
||||||
sonarr = 8989;
|
sonarr = 8989;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +19,11 @@ let
|
||||||
enable = true;
|
enable = true;
|
||||||
group = "media";
|
group = "media";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Thankfully those old style services all define users with homes
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.users.user.${service}.home
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkRedirection = service: {
|
mkRedirection = service: {
|
||||||
|
@ -52,7 +58,7 @@ let
|
||||||
]);
|
]);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.services.pirate = {
|
options.my.services.servarr = {
|
||||||
enable = lib.mkEnableOption "Media automation";
|
enable = lib.mkEnableOption "Media automation";
|
||||||
|
|
||||||
bazarr = {
|
bazarr = {
|
||||||
|
@ -67,6 +73,10 @@ in
|
||||||
enable = lib.my.mkDisableOption "Radarr";
|
enable = lib.my.mkDisableOption "Radarr";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
readarr = {
|
||||||
|
enable = lib.my.mkDisableOption "Readarr";
|
||||||
|
};
|
||||||
|
|
||||||
sonarr = {
|
sonarr = {
|
||||||
enable = lib.my.mkDisableOption "Sonarr";
|
enable = lib.my.mkDisableOption "Sonarr";
|
||||||
};
|
};
|
||||||
|
@ -85,6 +95,9 @@ in
|
||||||
# Radarr for movies
|
# Radarr for movies
|
||||||
(mkFullConfig "radarr")
|
(mkFullConfig "radarr")
|
||||||
(mkFail2Ban "radarr")
|
(mkFail2Ban "radarr")
|
||||||
|
# Readarr for books
|
||||||
|
(mkFullConfig "readarr")
|
||||||
|
(mkFail2Ban "readarr")
|
||||||
# Sonarr for shows
|
# Sonarr for shows
|
||||||
(mkFullConfig "sonarr")
|
(mkFullConfig "sonarr")
|
||||||
(mkFail2Ban "sonarr")
|
(mkFail2Ban "sonarr")
|
|
@ -20,6 +20,14 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Persist SSH keys
|
||||||
|
my.system.persist.files = [
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
|
"/etc/ssh/ssh_host_rsa_key"
|
||||||
|
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
|
];
|
||||||
|
|
||||||
# Opens the relevant UDP ports.
|
# Opens the relevant UDP ports.
|
||||||
programs.mosh.enable = true;
|
programs.mosh.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -82,5 +82,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: backup
|
||||||
|
# FIXME: persistence
|
||||||
|
|
||||||
|
# NOTE: unfortunately tandoor-recipes does not log connection failures for fail2ban
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,5 +90,11 @@ in
|
||||||
allowedTCPPorts = [ cfg.peerPort ];
|
allowedTCPPorts = [ cfg.peerPort ];
|
||||||
allowedUDPPorts = [ cfg.peerPort ];
|
allowedUDPPorts = [ cfg.peerPort ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.transmission.home
|
||||||
|
];
|
||||||
|
|
||||||
|
# NOTE: unfortunately transmission does not log connection failures for fail2ban
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ in
|
||||||
service = {
|
service = {
|
||||||
# Only allow registration of users through the CLI
|
# Only allow registration of users through the CLI
|
||||||
enableregistration = false;
|
enableregistration = false;
|
||||||
# Ues the host's timezone
|
# Use the host's timezone
|
||||||
timezone = config.time.timeZone;
|
timezone = config.time.timeZone;
|
||||||
# Use UNIX socket for serving the API
|
# Use UNIX socket for serving the API
|
||||||
unixsocket = socketPath;
|
unixsocket = socketPath;
|
||||||
|
@ -99,5 +99,9 @@ in
|
||||||
config.services.vikunja.settings.files.basepath
|
config.services.vikunja.settings.files.basepath
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: persistence
|
||||||
|
|
||||||
|
# NOTE: unfortunately vikunja does not log connection failures for fail2ban
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,7 +206,7 @@ in
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
# Additional inteface is only used to get access to "LAN" from wireguard
|
# Additional interface is only used to get access to "LAN" from wireguard
|
||||||
(lib.mkIf cfg.internal.enable {
|
(lib.mkIf cfg.internal.enable {
|
||||||
networking.wg-quick.interfaces."${cfg.internal.name}" = mkInterface [
|
networking.wg-quick.interfaces."${cfg.internal.name}" = mkInterface [
|
||||||
"${cfg.net.v4.subnet}.0/${toString cfg.net.v4.mask}"
|
"${cfg.net.v4.subnet}.0/${toString cfg.net.v4.mask}"
|
||||||
|
|
|
@ -61,5 +61,7 @@ in
|
||||||
port = cfg.rpcPort;
|
port = cfg.rpcPort;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: persistence
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
./language
|
./language
|
||||||
./nix
|
./nix
|
||||||
./packages
|
./packages
|
||||||
|
./persist
|
||||||
./podman
|
./podman
|
||||||
./polkit
|
./polkit
|
||||||
./printing
|
./printing
|
||||||
|
|
|
@ -23,5 +23,9 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/docker"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,10 @@ in
|
||||||
options.my.system.nix = with lib; {
|
options.my.system.nix = with lib; {
|
||||||
enable = my.mkDisableOption "nix configuration";
|
enable = my.mkDisableOption "nix configuration";
|
||||||
|
|
||||||
|
gc = {
|
||||||
|
enable = my.mkDisableOption "nix GC configuration";
|
||||||
|
};
|
||||||
|
|
||||||
cache = {
|
cache = {
|
||||||
selfHosted = my.mkDisableOption "self-hosted cache";
|
selfHosted = my.mkDisableOption "self-hosted cache";
|
||||||
};
|
};
|
||||||
|
@ -62,6 +66,22 @@ in
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(lib.mkIf cfg.gc.enable {
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
|
||||||
|
# Every week, with some wiggle room
|
||||||
|
dates = "weekly";
|
||||||
|
randomizedDelaySec = "10min";
|
||||||
|
|
||||||
|
# Use a persistent timer for e.g: laptops
|
||||||
|
persistent = true;
|
||||||
|
|
||||||
|
# Delete old profiles automatically after 15 days
|
||||||
|
options = "--delete-older-than 15d";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
(lib.mkIf cfg.cache.selfHosted {
|
(lib.mkIf cfg.cache.selfHosted {
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -14,12 +14,14 @@ in
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
vim.defaultEditor = true; # Modal editing is life
|
vim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true; # Modal editing is life
|
||||||
|
};
|
||||||
|
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true; # Use integrations
|
enable = true; # Use integrations
|
||||||
|
|
65
modules/nixos/system/persist/default.nix
Normal file
65
modules/nixos/system/persist/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
# Ephemeral root configuration
|
||||||
|
{ config, inputs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.system.persist;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
];
|
||||||
|
|
||||||
|
options.my.system.persist = with lib; {
|
||||||
|
enable = mkEnableOption "stateless system configuration";
|
||||||
|
|
||||||
|
mountPoint = lib.mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/persistent";
|
||||||
|
example = "/etc/nix/persist";
|
||||||
|
description = ''
|
||||||
|
Which mount point should be used to persist this system's files and
|
||||||
|
directories.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
files = lib.mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [ ];
|
||||||
|
example = [
|
||||||
|
"/etc/nix/id_rsa"
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Additional files in the root to link to persistent storage.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
directories = lib.mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [ ];
|
||||||
|
example = [
|
||||||
|
"/var/lib/libvirt"
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Additional directories in the root to link to persistent storage.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.persistence."${cfg.mountPoint}" = {
|
||||||
|
files = [
|
||||||
|
"/etc/machine-id"
|
||||||
|
]
|
||||||
|
++ cfg.files
|
||||||
|
;
|
||||||
|
|
||||||
|
directories = [
|
||||||
|
"/etc/nixos"
|
||||||
|
"/var/log"
|
||||||
|
"/var/lib/nixos"
|
||||||
|
"/var/lib/systemd/coredump"
|
||||||
|
]
|
||||||
|
++ cfg.directories
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -44,5 +44,9 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.system.persist.directories = [
|
||||||
|
"/var/lib/containers"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
14
overlays/downgrade-transmission/default.nix
Normal file
14
overlays/downgrade-transmission/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
self: prev:
|
||||||
|
{
|
||||||
|
transmission_4 = prev.transmission_4.overrideAttrs (_: {
|
||||||
|
version = "4.0.5";
|
||||||
|
|
||||||
|
src = self.fetchFromGitHub {
|
||||||
|
owner = "transmission";
|
||||||
|
repo = "transmission";
|
||||||
|
rev = "4.0.5";
|
||||||
|
hash = "sha256-gd1LGAhMuSyC/19wxkoE2mqVozjGPfupIPGojKY0Hn4=";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
47
pkgs/cgt-calc/default.nix
Normal file
47
pkgs/cgt-calc/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, python3Packages
|
||||||
|
, withTeXLive ? true
|
||||||
|
, texliveSmall
|
||||||
|
}:
|
||||||
|
python3Packages.buildPythonApplication rec {
|
||||||
|
pname = "cgt-calc";
|
||||||
|
version = "1.13.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "KapJI";
|
||||||
|
repo = "capital-gains-calculator";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-y/Y05wG89nccXyxfjqazyPJhd8dOkfwRJre+Rzx97Hw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = with python3Packages; [
|
||||||
|
poetry-core
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = with python3Packages; [
|
||||||
|
defusedxml
|
||||||
|
jinja2
|
||||||
|
pandas
|
||||||
|
requests
|
||||||
|
types-requests
|
||||||
|
yfinance
|
||||||
|
];
|
||||||
|
|
||||||
|
makeWrapperArgs = lib.optionals withTeXLive [
|
||||||
|
"--prefix"
|
||||||
|
"PATH"
|
||||||
|
":"
|
||||||
|
"${lib.getBin texliveSmall}/bin"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "UK capital gains tax calculator";
|
||||||
|
homepage = "https://github.com/KapJI/capital-gains-calculator";
|
||||||
|
license = with licenses; [ mit ];
|
||||||
|
mainProgram = "cgt-calc";
|
||||||
|
maintainers = with maintainers; [ ambroisie ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,6 +2,8 @@
|
||||||
pkgs.lib.makeScope pkgs.newScope (pkgs: {
|
pkgs.lib.makeScope pkgs.newScope (pkgs: {
|
||||||
bw-pass = pkgs.callPackage ./bw-pass { };
|
bw-pass = pkgs.callPackage ./bw-pass { };
|
||||||
|
|
||||||
|
cgt-calc = pkgs.callPackage ./cgt-calc { };
|
||||||
|
|
||||||
change-audio = pkgs.callPackage ./change-audio { };
|
change-audio = pkgs.callPackage ./change-audio { };
|
||||||
|
|
||||||
change-backlight = pkgs.callPackage ./change-backlight { };
|
change-backlight = pkgs.callPackage ./change-backlight { };
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{ lib, fetchFromGitHub, rustPlatform }:
|
{ lib, fetchFromGitHub, rustPlatform }:
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "lohr";
|
pname = "lohr";
|
||||||
version = "0.4.5";
|
version = "0.4.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "alarsyo";
|
owner = "alarsyo";
|
||||||
repo = "lohr";
|
repo = "lohr";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-p6E/r+OxFTpxDpOKSlacOxvRLfHSKg1mHNAfTytfqDY=";
|
hash = "sha256-dunQgtap+XCK5LoSyOqIY/6p6HizBeiyPWNuCffwjDU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-hext0S0o9D9pN9epzXtD5dwAYMPCLpBBOBT4FX0mTMk=";
|
cargoHash = "sha256-EUhyrhPe+mUgMmm4o+bxRIiSNReJRfw+/O1fPr8r7lo=";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Git mirroring daemon";
|
description = "Git mirroring daemon";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, gawk, stdenvNoCC, stevenblack-blocklist }:
|
{ lib, gawk, stdenvNoCC, stevenblack-blocklist }:
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
name = "unbound-zones-adblock";
|
name = "unbound-zones-adblock";
|
||||||
version = stevenblack-blocklist.rev;
|
inherit (stevenblack-blocklist) version;
|
||||||
|
|
||||||
src = stevenblack-blocklist;
|
src = stevenblack-blocklist;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ stdenvNoCC.mkDerivation {
|
||||||
description = "Unified host lists, ready to be used by unbound";
|
description = "Unified host lists, ready to be used by unbound";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
This is a simple derivation based on StevenBlack's unified hosts list.
|
This is a simple derivation based on StevenBlack's unified hosts list.
|
||||||
The files have been modified for easy use wih unbound.
|
The files have been modified for easy use with unbound.
|
||||||
'';
|
'';
|
||||||
homepage = "https://github.com/StevenBlack/hosts";
|
homepage = "https://github.com/StevenBlack/hosts";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
Loading…
Reference in a new issue