summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-10-19 20:40:27 +0200
committermakefu <github@syntax-fehler.de>2015-10-19 20:40:27 +0200
commitaed6c87e7ac4fb46f4029208d8938ba0fa869491 (patch)
tree177dffd829d2668bcbafee29f3bc72f15930f35a /krebs/3modules
parent952c03b3742cc1a979e4a1c148d083f1334cfe65 (diff)
parent222ca361e38b09ddef563abaaacd114ec86e2a5c (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/default.nix1
-rw-r--r--krebs/3modules/nginx.nix13
-rw-r--r--krebs/3modules/tv/default.nix36
3 files changed, 48 insertions, 2 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index ea1894709..ff0cc8346 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -77,6 +77,7 @@ let
{
krebs.dns.providers = {
de.krebsco = "zones";
+ gg23 = "hosts";
internet = "hosts";
retiolum = "hosts";
};
diff --git a/krebs/3modules/nginx.nix b/krebs/3modules/nginx.nix
index 702e8a7f6..65f3b238e 100644
--- a/krebs/3modules/nginx.nix
+++ b/krebs/3modules/nginx.nix
@@ -24,9 +24,17 @@ let
"${config.networking.hostName}.retiolum"
];
};
+ port = mkOption {
+ type = with types; int;
+ default = 80;
+ };
locations = mkOption {
type = with types; listOf (attrsOf str);
};
+ extraConfig = mkOption {
+ type = with types; str;
+ default = "";
+ };
};
default = {};
};
@@ -60,10 +68,11 @@ let
}
'';
- to-server = { server-names, locations, ... }: ''
+ to-server = { server-names, port, locations, extraConfig, ... }: ''
server {
- listen 80;
+ listen ${toString port};
server_name ${toString server-names};
+ ${extraConfig}
${indent (concatStrings (map to-location locations))}
}
'';
diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix
index f5ec854c9..5d5fead8f 100644
--- a/krebs/3modules/tv/default.nix
+++ b/krebs/3modules/tv/default.nix
@@ -134,6 +134,10 @@ with import ../../4lib { inherit lib; };
cores = 2;
dc = "tv"; #dc = "gg23";
nets = rec {
+ gg23 = {
+ addrs4 = ["10.23.1.110"];
+ aliases = ["nomic.gg23"];
+ };
retiolum = {
addrs4 = ["10.243.0.110"];
addrs6 = ["42:02d5:733f:d6da:c0f5:2bb7:2b18:09ec"];
@@ -156,6 +160,14 @@ with import ../../4lib { inherit lib; };
secure = true;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILn7C3LxAs9kUynENdRNgQs4qjrhNDfXzlHTpVJt6e09";
};
+ ok = {
+ nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.1"];
+ aliases = ["ok.gg23"];
+ };
+ };
+ };
rmdir = rec {
cores = 1;
dc = "tv"; #dc = "cac";
@@ -189,11 +201,31 @@ with import ../../4lib { inherit lib; };
ssh.privkey.path = <secrets/ssh.id_ed25519>;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICLuhLRmt8M5s2Edwwl9XY0KAAivzmPCEweesH5/KhR4";
};
+ schnabeldrucker = {
+ nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.21"];
+ aliases = ["schnabeldrucker.gg23"];
+ };
+ };
+ };
+ schnabelscanner = {
+ nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.22"];
+ aliases = ["schnabelscanner.gg23"];
+ };
+ };
+ };
wu = {
cores = 4;
# TODO wu is mobile, so dc means "home data center"
dc = "tv"; #dc = "gg23";
nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.37"];
+ aliases = ["wu.gg23"];
+ };
retiolum = {
addrs4 = ["10.243.13.37"];
addrs6 = ["42:0:0:0:0:0:0:1337"];
@@ -220,6 +252,10 @@ with import ../../4lib { inherit lib; };
# TODO xu is mobile, so dc means "home data center"
dc = "tv"; #dc = "gg23";
nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.38"];
+ aliases = ["xu.gg23"];
+ };
retiolum = {
addrs4 = ["10.243.13.38"];
addrs6 = ["42:0:0:0:0:0:0:1338"];