mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-08 06:30:18 +02:00
feat: ajout de Django 3.1.14, configuration de sabnzbd et amélioration de l'archivebox
This commit is contained in:
parent
e8bb4e0586
commit
7a8cf7b1df
4 changed files with 71 additions and 26 deletions
|
@ -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" ];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue