summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/retiolum-hosts.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2019-03-21 20:09:09 +0100
committerjeschli <jeschli@gmail.com>2019-03-21 20:09:09 +0100
commita045a7f054859efcb40baf8ded13bcb7fd706d01 (patch)
treedf23b0d31db9fc0b0087f4d5d4c7b3dd7a88b44c /krebs/3modules/retiolum-hosts.nix
parented499a84a9fe067c80e5a4768482333863c1e9ad (diff)
parent550faa1f64434951cd3949bc96a25012349f0090 (diff)
Merge branch 'master' of prism.r:stockholm into new-master
Diffstat (limited to 'krebs/3modules/retiolum-hosts.nix')
-rw-r--r--krebs/3modules/retiolum-hosts.nix28
1 files changed, 0 insertions, 28 deletions
diff --git a/krebs/3modules/retiolum-hosts.nix b/krebs/3modules/retiolum-hosts.nix
deleted file mode 100644
index ddf85ead7..000000000
--- a/krebs/3modules/retiolum-hosts.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-with import <stockholm/lib>;
-{ config, ... }: let
- # TODO dedup functions with ./hosts.nix
- check = hostname: any (domain: hasSuffix ".${domain}" hostname) domains;
- domains = attrNames (filterAttrs (_: eq "hosts") config.krebs.dns.providers);
-in {
- nixpkgs.config.packageOverrides = super: {
- retiolum-hosts =
- super.writeText "retiolum-hosts" ''
- ${
- concatStringsSep
- "\n"
- (flatten
- (map
- (host: let
- net = host.nets.retiolum;
- aliases = longs;
- longs = filter check net.aliases;
- in
- optionals
- (aliases != [])
- (map (addr: "${addr} ${toString aliases}") net.addrs))
- (filter (host: hasAttr "retiolum" host.nets)
- (attrValues config.krebs.hosts))))
- }
- '';
- };
-}