stream: init
This commit is contained in:
parent
662d4f9efa
commit
9a936461e6
|
@ -181,11 +181,11 @@
|
|||
"zentralwerk-network-key": "zentralwerk-network-key"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1630966288,
|
||||
"narHash": "sha256-PbCOvTH+Whi6byuxo1d7A3IxYdXjqDuwjVsE4KNvOSA=",
|
||||
"lastModified": 1631305227,
|
||||
"narHash": "sha256-O/R40Yur8Yd6+C/V2FUt5x9T5kRXkfBqU0svvkM0KO4=",
|
||||
"ref": "master",
|
||||
"rev": "04de05ce751532e6f671be2b36988e54cbed25e4",
|
||||
"revCount": 1166,
|
||||
"rev": "c98323c5a904b42e90db385e8e94123d14f96ad4",
|
||||
"revCount": 1168,
|
||||
"type": "git",
|
||||
"url": "https://gitea.c3d2.de/zentralwerk/network.git"
|
||||
},
|
||||
|
|
|
@ -319,6 +319,14 @@
|
|||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
stream = nixosSystem' {
|
||||
modules = [
|
||||
./lib/lxc-container.nix
|
||||
./hosts/containers/stream
|
||||
];
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
nixosModules.c3d2 = import ./lib;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ hostRegistry, config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -35,6 +35,10 @@
|
|||
hostNames = [ "vps1.nixvita.de" "vps1.codetu.be" "nixvita.de" ];
|
||||
proxyTo.host = "172.20.73.51";
|
||||
}
|
||||
{
|
||||
hostNames = [ "stream.hq.c3d2.de" ];
|
||||
proxyTo.host = hostRegistry.hosts.stream.ip4;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
{ hostRegistry, pkgs, ... }:
|
||||
let
|
||||
authFile = pkgs.writeText "htpasswd" "k-ot:sawCOTsl/fIUY";
|
||||
in
|
||||
{
|
||||
c3d2.hq.statistics.enable = true;
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
|
||||
networks."00-serv" = {
|
||||
matchConfig.MACAddress = "C6:40:E0:21:9B:A4";
|
||||
networkConfig.IPv6AcceptRA = false;
|
||||
addresses = [ {
|
||||
addressConfig.Address = "${hostRegistry.hosts.stream.ip4}/26";
|
||||
} ];
|
||||
routes = [ {
|
||||
routeConfig = {
|
||||
Destination = "172.20.0.0/14";
|
||||
Gateway = hostRegistry.hosts.serv-gw.ip4;
|
||||
};
|
||||
} ];
|
||||
};
|
||||
|
||||
networks."01-pub" = {
|
||||
matchConfig.MACAddress = "DE:91:C7:51:D1:C5";
|
||||
networkConfig.DHCP = "ipv4";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
services.peerflix.enable = true;
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts."stream.hq.c3d2.de" = {
|
||||
default = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:9000";
|
||||
extraConfig = ''
|
||||
auth_basic "Stream";
|
||||
auth_basic_user_file ${authFile};
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
email = "mail@c3d2.de";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue