Work on hydra config, fix tor relay config, prepare web-public-2 host
This commit is contained in:
parent
64d9dbd4b0
commit
c6f4780ccd
15 changed files with 176 additions and 9 deletions
14
hosts/hydra/configuration.nix
Normal file
14
hosts/hydra/configuration.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "hydra";
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
10
hosts/hydra/default.nix
Normal file
10
hosts/hydra/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./secrets.nix
|
||||
./hydra.nix
|
||||
./nix-serve.nix
|
||||
./nginx.nix
|
||||
];
|
||||
}
|
14
hosts/hydra/hydra.nix
Normal file
14
hosts/hydra/hydra.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
hydraURL = "https://hydra.nekover.se";
|
||||
listenHost = "localhost";
|
||||
port = 3001;
|
||||
useSubstitutes = true;
|
||||
notificationSender = "hydra@robot.grzb.de";
|
||||
extraConfig = "
|
||||
binary_cache_public_uri = https://nix-cache.nekover.se
|
||||
";
|
||||
};
|
||||
}
|
33
hosts/hydra/nginx.nix
Normal file
33
hosts/hydra/nginx.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
|
||||
"hydra.nekover.se" = {
|
||||
enableACME = true;
|
||||
listen = [{
|
||||
addr = "0.0.0.0";
|
||||
port = 8443;
|
||||
ssl = true;
|
||||
}];
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3001";
|
||||
};
|
||||
};
|
||||
|
||||
"nix-cache.nekover.se" = {
|
||||
enableACME = true;
|
||||
listen = [{
|
||||
addr = "0.0.0.0";
|
||||
port = 8443;
|
||||
ssl = true;
|
||||
}];
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:5005";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
9
hosts/hydra/nix-serve.nix
Normal file
9
hosts/hydra/nix-serve.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
port = 5005;
|
||||
bindAddress = "localhost";
|
||||
secretKeyFile = "/secrets/signing-key.secret";
|
||||
};
|
||||
}
|
11
hosts/hydra/secrets.nix
Normal file
11
hosts/hydra/secrets.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
deployment.keys."signing-key.secret" = {
|
||||
keyCommand = [ "env" "GNUPGHOME=/home/yuri/.passinfra_gnupg" "PASSWORD_STORE_DIR=/home/yuri/pass/infra" "pass" "hydra/signing-key" ];
|
||||
destDir = "/secrets";
|
||||
user = "root";
|
||||
group = "root";
|
||||
permissions = "0640";
|
||||
uploadAt = "pre-activation";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue