Merge remote-tracking branch 'origin'
This commit is contained in:
commit
7865de7103
3 changed files with 60 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
elmskell-blog.url = "git+file:///var/lib/git-server/blog.git";
|
elmskell-blog.url = "git+file:///var/lib/git-server/blog.git";
|
||||||
jank-client.url = "git+file:///var/lib/git-server/jank-client-fork.git";
|
jank-client.url = "git+file:///var/lib/git-server/jank-client-fork.git";
|
||||||
|
math-project.url = "git+file:///var/lib/git-server/math-project.git";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
elmskell-blog,
|
elmskell-blog,
|
||||||
spacebar-server,
|
spacebar-server,
|
||||||
jank-client,
|
jank-client,
|
||||||
|
math-project,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -44,6 +46,10 @@
|
||||||
noshell.nixosModules.default
|
noshell.nixosModules.default
|
||||||
{programs.noshell.enable = true;}
|
{programs.noshell.enable = true;}
|
||||||
|
|
||||||
|
math-project.nixosModules.default
|
||||||
|
{programs.math-project.enable = true;}
|
||||||
|
./services/math-project.nix
|
||||||
|
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
domain = "blog.mtgmonkey.net";
|
domain = "blog.mtgmonkey.net";
|
||||||
proxyTo = "http://localhost:9181/";
|
proxyTo = "http://localhost:9181/";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
domain = "math.mtgmonkey.net";
|
||||||
|
proxyTo = "http://localhost:9282/";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
domain = "git.mtgmonkey.net";
|
domain = "git.mtgmonkey.net";
|
||||||
proxyTo = "http://localhost:8000/";
|
proxyTo = "http://localhost:8000/";
|
||||||
|
@ -35,9 +39,8 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
domain = "translate.mtgmonkey.net";
|
domain = "translate.mtgmonkey.net";
|
||||||
proxyTo = "http://localhost:9109/"
|
proxyTo = "http://localhost:9109/";
|
||||||
}
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
49
services/math-project.nix
Executable file
49
services/math-project.nix
Executable file
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
math-project,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
botPolicies-nix = {
|
||||||
|
dnsbl = false;
|
||||||
|
status_codes = {
|
||||||
|
CHALLENGE = 200;
|
||||||
|
DENY = 200;
|
||||||
|
};
|
||||||
|
bots = [
|
||||||
|
{
|
||||||
|
name = "catch-everything";
|
||||||
|
user_agent_regex = ".*";
|
||||||
|
action = "CHALLENGE";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services.anubis = {
|
||||||
|
instances.math-project = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
BIND = "[::1]:9282";
|
||||||
|
BIND_NETWORK = "tcp";
|
||||||
|
DIFFICULTY = 4;
|
||||||
|
METRICS_BIND = "[::1]:9283";
|
||||||
|
METRICS_BIND_NETWORK = "tcp";
|
||||||
|
POLICY_FNAME = "/etc/anubis/math-project.botPolicies.yaml";
|
||||||
|
TARGET = "http://localhost:8080";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."anubis/math-project.botPolicies.yaml" = {
|
||||||
|
source = (pkgs.formats.yaml {}).generate "" botPolicies-nix;
|
||||||
|
mode = "644";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.math-project = {
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${lib.getExe math-project}";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue