[antamap] init
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
{ self, config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
antamap-pkg = pkgs.stdenv.mkDerivation {
|
||||
name = "antamap";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://0xacab.org/AND/antamap.git";
|
||||
branchName = "master";
|
||||
rev = "f62cc588df661e089d4ffb17adb78e667bda8f87";
|
||||
sha256 = "sha256-vMAk2pphApkp1YkFBtX4cQDAyxDgMLnrhI4DTVgBYdE=";
|
||||
};
|
||||
|
||||
installPhase = "mkdir -p $out; cp -R * $out/";
|
||||
};
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "antamap";
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
imports = [
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."_" = {
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
root = "${antamap-pkg}";
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ in
|
||||
"zineshop"
|
||||
"vaultwarden"
|
||||
"pretalx"
|
||||
"antamap"
|
||||
];
|
||||
|
||||
networking = {
|
||||
@@ -286,6 +287,15 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."antamap.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://${hosts.malobeo.hosts.antamap.network.address}:80";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.tor = {
|
||||
|
||||
@@ -108,6 +108,11 @@ in
|
||||
type = "microvm";
|
||||
network = createMaloNet "18" "52:DA:0D:F9:EF:F4";
|
||||
};
|
||||
|
||||
antamap = {
|
||||
type = "microvm";
|
||||
network = createMaloNet "20" "52:DA:0D:F9:EF:F6";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user