feat: big refactor

This commit is contained in:
Jacob Bachmann 2024-09-07 15:10:22 +02:00
parent 2c09c21833
commit ebedec9768
No known key found for this signature in database
GPG key ID: 7753026D577922A6
159 changed files with 1927 additions and 2222 deletions

View file

@ -0,0 +1,6 @@
{
imports = [
./flare-solvarr.nix
./jackett.nix
];
}

View file

@ -0,0 +1,26 @@
{ config, lib, ... }:
{
options.bchmnn.services.flare-solvarr = {
enable = lib.mkEnableOption "flare-solvarr";
};
config = lib.mkIf (config.bchmnn.services.flare-solvarr.enable) {
virtualisation = {
oci-containers = {
containers = {
flare-solvarr = {
image = "ghcr.io/flaresolverr/flaresolverr:latest";
autoStart = true;
ports = [ "127.0.0.1:8191:8191" ];
environment = {
LOG_LEVEL = "info";
LOG_HTML = "false";
CAPTCHA_SOLVER = "hcaptcha-solver";
TZ = "Europe/Berlin";
};
};
};
};
};
};
}

View file

@ -0,0 +1,12 @@
{ config, lib, ... }:
{
options.bchmnn.services.jackett = {
enable = lib.mkEnableOption "jackett";
};
config = {
services.jackett = {
enable = config.bchmnn.services.jackett.enable;
};
};
}

View file

@ -0,0 +1,90 @@
{ lib, config, ... }:
lib.mkIf config.bchmnn.sync.enable {
options.bchmnn.services.syncthing = {
enable = lib.mkEnableOption "syncthing";
};
config = lib.mkIf (config.bchmnn.services.syncthing.enable) {
services.syncthing = {
enable = false;
openDefaultPorts = true;
settings = {
devices = {
T430 = {
id = "UGQINNI-SC6F24X-5JE7YTP-LZLORTX-7GQ5NKK-YMRDRPK-JHRTWUV-4ILUJQQ";
};
IROH = {
id = "PJA2MBA-66PQQEO-5KICONS-FGHDH46-YRV2X5Y-47UUP77-QXI2WNS-R33FPAK";
};
};
folders = {
"dl" = {
path = "~/dl";
id = "z97eb-myxtp";
devices = [
"IROH"
"T430"
];
};
"docs" = {
path = "~/docs";
id = "rhh6x-dmymv";
devices = [
"IROH"
"T430"
];
};
"music" = {
path = "~/music";
id = "umzur-ncrf6";
devices = [
"IROH"
"T430"
];
};
"orgfiles" = {
path = "~/orgfiles";
id = "0f5t9-dl5l5";
devices = [ ];
versioning = {
type = "simple";
params.keep = "5";
};
};
"pics" = {
path = "~/pics";
id = "cuejs-esf7u";
devices = [
"IROH"
"T430"
];
};
"tmp" = {
path = "~/tmp";
id = "d6k5d-hdxyh";
devices = [
"IROH"
"T430"
];
};
"vids" = {
path = "~/vids";
id = "bjx9u-ujjwi";
devices = [
"IROH"
"T430"
];
};
};
};
user = "gandalf";
group = "users";
dataDir = "/home/gandalf";
};
};
}