Compare commits
No commits in common. "d187aaba793228c352d566add7c16f7b9a02bf02" and "3553afc8d83d25925eb50f84605af4dad109a423" have entirely different histories.
d187aaba79
...
3553afc8d8
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./fileserver.nix
|
||||
./jellyfin.nix
|
||||
./samba.nix
|
||||
];
|
||||
|
@ -29,8 +28,6 @@
|
|||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
7474 # mirror revproxy
|
||||
7475 # http serve tvb pool
|
||||
7476 # tvb catacomb host server
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -42,33 +39,14 @@
|
|||
rejectSSL = true;
|
||||
locations."/".return = "444";
|
||||
};
|
||||
"pool.backyard.home" = {
|
||||
listen = [
|
||||
{ addr = "10.22.20.8"; }
|
||||
# Alternative port to ensure the right vhost connects
|
||||
{ addr = "10.22.20.8"; port = 7475; }
|
||||
];
|
||||
root = "/pool/tvb";
|
||||
locations."/".extraConfig = ''
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
'';
|
||||
};
|
||||
"mirror.backyard.home" = {
|
||||
listen = [
|
||||
{ addr = "10.22.20.8"; }
|
||||
# Alternative port to ensure the right vhost connects
|
||||
# Serve the mirror on a unique port to ensure the revproxy connects to the right vhost
|
||||
{ addr = "10.22.20.8"; port = 7474; }
|
||||
];
|
||||
root = "/pool/tvb/doc/website/mirror";
|
||||
};
|
||||
"files.backyard.home" = {
|
||||
listen = [
|
||||
{ addr = "10.22.20.8"; port = 7476; }
|
||||
];
|
||||
locations."/".tryFiles = "\$uri @indexer";
|
||||
locations."@indexer".proxyPass = "http://localhost:5000";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
# nas indexer server module
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
# Build the catacomb server package
|
||||
catacombServerSource = builtins.fetchGit {
|
||||
url = "https://git.alogoulogoi.com/Jaculabilis/catacomb-server.git";
|
||||
ref = "develop-nix";
|
||||
rev = "3d6fb16948c377f94d030648849f120c8ada3884";
|
||||
};
|
||||
catacombServer = pkgs.callPackage catacombServerSource {
|
||||
pkgs = import (fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/405d762a1a05ffed2ac820eb4bae4bc49bc3abf2.tar.gz";
|
||||
sha256 = "6c835ea038bdfe170029a8bd4276c9d3a95c275159ec05426672fa8092c7947d";
|
||||
}) {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
};
|
||||
|
||||
# Host-mode server run script
|
||||
hostRun = pkgs.writeShellScriptBin "catacomb-run-host.sh" ''
|
||||
${catacombServer}/bin/gunicorn \
|
||||
--bind=localhost:5000 \
|
||||
--workers=3 \
|
||||
--log-level=debug \
|
||||
--env CATACOMB_ROOT=/pool/tvb \
|
||||
--env CATACOMB_MODE=host \
|
||||
--env CATACOMB_TOKENS=/var/empty \
|
||||
--env CATACOMB_GUEST_HOST=catacomb.alogoulogoi.com \
|
||||
"catacomb.server:wsgi()"
|
||||
'';
|
||||
in
|
||||
{
|
||||
# Set up the host mode service
|
||||
systemd.services."catacomb-host" = {
|
||||
enable = true;
|
||||
description = "catapool host-mode index server";
|
||||
script = "${hostRun}/bin/catacomb-run-host.sh";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "nginx";
|
||||
};
|
||||
requires = [ "zfs.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
};
|
||||
}
|
|
@ -243,7 +243,6 @@ in {
|
|||
];
|
||||
"10.22.20.8" = [
|
||||
"backyard.home"
|
||||
"pool.backyard.home"
|
||||
"mirror.backyard.home"
|
||||
"jellyfin.home.ktvb.site"
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue