summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/lass/default.nix28
-rw-r--r--krebs/3modules/nginx.nix8
2 files changed, 32 insertions, 4 deletions
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index afedf95f2..5c48d9642 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -104,7 +104,11 @@ with import ../../4lib { inherit lib; };
uriel = {
cores = 1;
dc = "lass";
- nets = rec {
+ nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.12"];
+ aliases = ["uriel.gg23"];
+ };
retiolum = {
addrs4 = ["10.243.81.176"];
addrs6 = ["42:dc25:60cf:94ef:759b:d2b6:98a9:2e56"];
@@ -131,7 +135,11 @@ with import ../../4lib { inherit lib; };
mors = {
cores = 2;
dc = "lass";
- nets = rec {
+ nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.11"];
+ aliases = ["mors.gg23"];
+ };
retiolum = {
addrs4 = ["10.243.0.2"];
addrs6 = ["42:0:0:0:0:0:0:dea7"];
@@ -155,6 +163,22 @@ with import ../../4lib { inherit lib; };
ssh.privkey.path = <secrets/ssh.id_ed25519>;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINAMPlIG+6u75GJ3kvsPF6OoIZsU+u8ZQ+rdviv5fNMD";
};
+ schnabel-ap = {
+ nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.20"];
+ aliases = ["schnabel-ap.gg23"];
+ };
+ };
+ };
+ Reichsfunk-ap = {
+ nets = {
+ gg23 = {
+ addrs4 = ["10.23.1.10"];
+ aliases = ["Reichsfunk-ap.gg23"];
+ };
+ };
+ };
};
users = addNames {
diff --git a/krebs/3modules/nginx.nix b/krebs/3modules/nginx.nix
index c5f38c271..0530921a0 100644
--- a/krebs/3modules/nginx.nix
+++ b/krebs/3modules/nginx.nix
@@ -25,8 +25,12 @@ let
];
};
listen = mkOption {
- type = with types; str;
+ type = with types; either str (listOf str);
default = "80";
+ apply = x:
+ if typeOf x != "list"
+ then [x]
+ else x;
};
locations = mkOption {
type = with types; listOf (attrsOf str);
@@ -70,7 +74,7 @@ let
to-server = { server-names, listen, locations, extraConfig, ... }: ''
server {
- listen ${listen};
+ ${concatMapStringsSep "\n" (x: "listen ${x};") listen}
server_name ${toString server-names};
${extraConfig}
${indent (concatStrings (map to-location locations))}