summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-11-11 13:44:55 +0100
committermakefu <github@syntax-fehler.de>2016-11-11 13:44:55 +0100
commit4d7f0e6c5bcd8b586711ad2394fac73ebbd3312d (patch)
treea21db730913e0915ec1e319af70673e7cf4e5001 /krebs/3modules
parent6c092cd20ca256b1cefa92aa779380cdb71c1313 (diff)
parent0e13a4e2373d891e6a895e4b6ad2b42da028ba12 (diff)
Merge remote-tracking branch 'prism/lassulus'
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/default.nix14
-rw-r--r--krebs/3modules/lass/default.nix2
-rw-r--r--krebs/3modules/makefu/default.nix2
-rw-r--r--krebs/3modules/os-release.nix2
-rw-r--r--krebs/3modules/retiolum.nix15
-rw-r--r--krebs/3modules/tv/default.nix55
6 files changed, 72 insertions, 18 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index ec85464df..82ede952d 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -90,11 +90,11 @@ let
};
imp = lib.mkMerge [
- { krebs = import ./lass { inherit config lib; }; }
- { krebs = import ./makefu { inherit config lib; }; }
- { krebs = import ./mv { inherit config lib; }; }
- { krebs = import ./shared { inherit config lib; }; }
- { krebs = import ./tv { inherit config lib; }; }
+ { krebs = import ./lass { inherit config; }; }
+ { krebs = import ./makefu { inherit config; }; }
+ { krebs = import ./mv { inherit config; }; }
+ { krebs = import ./shared { inherit config; }; }
+ { krebs = import ./tv { inherit config; }; }
{
krebs.dns.providers = {
"krebsco.de" = "zones";
@@ -130,7 +130,9 @@ let
shorts = let s = ".${cfg.search-domain}"; in
map (removeSuffix s) (filter (hasSuffix s) longs);
in
- map (addr: "${addr} ${toString aliases}") net.addrs
+ optionals
+ (aliases != [])
+ (map (addr: "${addr} ${toString aliases}") net.addrs)
) (filterAttrs (name: host: host.aliases != []) host.nets)
) cfg.hosts
));
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index ad1221e8e..5af1e37cd 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -1,4 +1,4 @@
-{ config, lib, ... }:
+{ config, ... }:
with import <stockholm/lib>;
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index 7317e0b60..ff187b878 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -1,4 +1,4 @@
-{ config, lib, ... }:
+{ config, ... }:
with import <stockholm/lib>;
diff --git a/krebs/3modules/os-release.nix b/krebs/3modules/os-release.nix
index 50cf72ef9..0779feede 100644
--- a/krebs/3modules/os-release.nix
+++ b/krebs/3modules/os-release.nix
@@ -13,7 +13,7 @@ let
version-id = "${stockholm-version-id}/${nixos-version-id}";
pretty-name = "${stockholm-pretty-name} / ${nixos-pretty-name}";
- home-url = http://cgit.cd.krebsco.de/stockholm;
+ home-url = http://cgit.ni.krebsco.de/stockholm;
in
{
# http://0pointer.de/public/systemd-man/os-release.html
diff --git a/krebs/3modules/retiolum.nix b/krebs/3modules/retiolum.nix
index fddaed9e3..0a3d7ed2f 100644
--- a/krebs/3modules/retiolum.nix
+++ b/krebs/3modules/retiolum.nix
@@ -79,6 +79,15 @@ let
'';
};
+ hostsArchive = mkOption {
+ type = types.package;
+ default = pkgs.runCommand "retiolum-hosts.tar.bz2" {} ''
+ ${pkgs.coreutils}/bin/ln -s ${tinc.config.hostsPackage} hosts
+ ${pkgs.gnutar}/bin/tar -hcjf $out hosts
+ '';
+ readOnly = true;
+ };
+
hostsPackage = mkOption {
type = types.package;
default = pkgs.stdenv.mkDerivation {
@@ -125,7 +134,11 @@ let
connectTo = mkOption {
type = types.listOf types.str;
- default = [ "fastpoke" "cd" "prism" "gum" ];
+ ${if tinc.config.netname == "retiolum" then "default" else null} = [
+ "gum"
+ "ni"
+ "prism"
+ ];
description = ''
The list of hosts in the network which the client will try to connect
to. These hosts should have an 'Address' configured which points to a
diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix
index 0e7535e6c..8e266e1b3 100644
--- a/krebs/3modules/tv/default.nix
+++ b/krebs/3modules/tv/default.nix
@@ -78,11 +78,7 @@ with import <stockholm/lib>;
extraZones = {
# TODO generate krebsco.de zone from nets and don't use extraZones at all
"krebsco.de" = ''
- krebsco.de. 60 IN MX 5 mx23
- mx23 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr}
cd 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr}
- cgit 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr}
- cgit.cd 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr}
'';
};
nets = {
@@ -90,11 +86,7 @@ with import <stockholm/lib>;
ip4.addr = "45.62.237.203";
aliases = [
"cd.i"
- "cd.internet"
"cd.krebsco.de"
- "cgit.cd.krebsco.de"
- "cd.viljetic.de"
- "cgit.cd.viljetic.de"
];
ssh.port = 11423;
};
@@ -218,6 +210,53 @@ with import <stockholm/lib>;
ssh.privkey.path = <secrets/ssh.id_ed25519>;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1vJsAddvxMA84u9iJEOrIkKn7pQiemMbfW5cfK1d7g root@mu";
};
+ ni = {
+ extraZones = {
+ "krebsco.de" = ''
+ krebsco.de. 60 IN MX 5 ni
+ ni 60 IN A ${config.krebs.hosts.ni.nets.internet.ip4.addr}
+ cgit 60 IN A ${config.krebs.hosts.ni.nets.internet.ip4.addr}
+ cgit.ni 60 IN A ${config.krebs.hosts.ni.nets.internet.ip4.addr}
+ '';
+ };
+ nets = {
+ internet = {
+ ip4.addr = "188.68.36.196";
+ aliases = [
+ "cgit.ni.i"
+ "ni.i"
+ ];
+ ssh.port = 11423;
+ };
+ retiolum = {
+ via = config.krebs.hosts.ni.nets.internet;
+ ip4.addr = "10.243.113.223";
+ ip6.addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af4";
+ aliases = [
+ "ni.r"
+ "ni.retiolum"
+ "cgit.ni.r"
+ "cgit.ni.retiolum"
+ ];
+ tinc.pubkey = ''
+ -----BEGIN RSA PUBLIC KEY-----
+ MIICCgKCAgEA7NHuW8eLVhpBfL70WwcSGVmv4dijKLJs5cH/BmqK8zN2lpiLKt12
+ bhaE1YEhGoGma7Kef1Fa0V9xUkJy6C1+sVlfWp/LeY8VRSX5E3u36TEl6kl/4zu6
+ Ea/44BoGUSOC9ImxVEX51czA10PFjUSrGFyK0oaRlKNsTwwpNiBOY7/6i74bhn59
+ OIsySRUBd2QPjYhJkiuc7gltVfwt6wteZh8R4w2rluVGYLQPsmN/XEWgJbhzI4im
+ W+3/bdewHVF1soZWtdocPLeXTn5HETX5g8p2V3bwYL37oIwkCcYxOeQtT7W+lNJ2
+ NvIiVh4Phojl4dBUgUQGT0NApMnsaG/4LJpSC4AGiqbsznBdSPhepob7zJggPnWY
+ nfAs+YrUUZp1wovhSgWfYTRglRuyYvWkoGbq411H1efawyZ0gcMr+HQlSn2keQOv
+ lbcvdgOAxQiEcPVixPq3mTeKaSxWyIJGFceuqtnILGifRNvViX0uo9g5rLQ41PrJ
+ 9F3azz3gD2Uh73j5pvLU72cge7p1a7epPYWTJYf8oc5JcI3nYTKpSqH8IYaWUjv9
+ q0NwOYFDhYtUcTwdbUNl/tUWKyBcovIe7f40723pHSijiPV2WDZC2M/mOc3dvWKF
+ Mf00uin+7uMuKtnG6+1z5nKb/AWrqN1RZu0rnG/IkZPKwa19HYsYcOkCAwEAAQ==
+ -----END RSA PUBLIC KEY-----
+ '';
+ };
+ };
+ ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILGDdcKwFm6udU0/x6XGGb87k9py0VlrxF54HeYu9Izb";
+ };
nomic = {
cores = 2;
nets = {