feat: ajout de Django 3.1.14, configuration de sabnzbd et amélioration de l'archivebox

This commit is contained in:
kity 2025-04-12 12:54:03 +02:00
parent e8bb4e0586
commit 7a8cf7b1df
4 changed files with 71 additions and 26 deletions

View file

@ -112,6 +112,7 @@ in
"aspnetcore-runtime-wrapped-6.0.36"
"dotnet-sdk-6.0.428"
"dotnet-sdk-wrapped-6.0.428"
"python3.12-django-3.1.14"
];
# seems like sabnzbd needs some unfree pkgs...

View file

@ -1,24 +1,11 @@
{ config, pkgs, ... }:
{ ... }:
{
services.sabnzbd = {
enable = true;
openFirewall = true;
};
services.caddy.virtualHosts."http://nzb.normandy.sisyphe.hypervirtual.world".extraConfig = ''
services.caddy.virtualHosts."http://nzb.sisyphe.normandy.hypervirtual.world".extraConfig = ''
reverse_proxy 8080
'';
/*
services.prometheus.exporters.sabnzbd = {
enable = true;
servers = [
{
sisyphe = {
};
}
];
};
*/
}

View file

@ -11,23 +11,54 @@
];
port = 9002;
};
borgmatic = {
enable = true;
};
systemd = {
enable = true;
};
sabnzbd = {
enable = true;
servers = [
{
"sisyphe" = {
apiKeyFile = "/run/secrets/sabnbzd_apikey";
};
}
];
};
redis = {
enable = true;
};
postgres = {
enable = true;
};
pihole = {
enable = true;
pihoeHostname = "192.168.1.25";
};
php-fpm = {
enable = true;
};
nextcloud = {
enable = true;
url = "https://cloud.hypervirtual.world";
tokenFile = "/run/secrets/nextcloudTokenFile";
};
};
scrapeConfigs = [
/*
{
job_name = "synapse";
scrape_interval = "15s";
metrics_path = "/_synapse/metrics";
static_configs = [ { targets = [ "localhost:9000" ]; } ];
}
*/
{
job_name = "homelab-stats";
static_configs = [
{ targets = [ "localhost:${builtins.toString config.services.prometheus.exporters.node.port}" ]; }
{
targets = [
"localhost:${builtins.toString config.services.prometheus.exporters.node.port}"
"192.168.1.197:9100"
];
}
];
}
];
};
}

View file

@ -1,6 +1,32 @@
{config, pkgs, ...}:
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
archivebox
nodejs_23
];
services.caddy.virtualHosts."archive.hypervirtual.world".extraConfig = ''
reverse_proxy 15632
'';
systemd.services."archivebox-web" = {
enable = true;
description = "Runs the archivebox web UI";
preStart = ''
mkdir -p /srv/archivebox
chown archivebox:archivebox /srv/archivebox
if [ ! -f /srv/archivebox/index.sqlite3 ]; then
sudo -u archivebox ${pkgs.archivebox}/bin/archivebox init --path /srv/archivebox
fi
'';
serviceConfig = {
ExecStart = "${pkgs.archivebox}/bin/archivebox server 0.0.0.0:15632 --path /srv/archivebox";
Restart = "always";
User = "archivebox";
Group = "archivebox";
WorkingDirectory = "/var/lib/archivebox";
};
wantedBy = [ "multi-user.target" ];
};
}