summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/retiolum-hosts.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-31 14:39:02 +0100
committertv <tv@krebsco.de>2019-01-31 14:41:26 +0100
commit478b45cf97007e3aa846a30360de2b1c9833bf85 (patch)
tree72fb7f8a9d3360b41090d647e05f478ad0d2a16b /krebs/3modules/retiolum-hosts.nix
parent54517574ddb2f5ae10bba02f0b7f547bb53fc5bd (diff)
krebs-hosts-*: generate from krebs.hosts
Diffstat (limited to 'krebs/3modules/retiolum-hosts.nix')
-rw-r--r--krebs/3modules/retiolum-hosts.nix26
1 files changed, 3 insertions, 23 deletions
diff --git a/krebs/3modules/retiolum-hosts.nix b/krebs/3modules/retiolum-hosts.nix
index ddf85ead7..2da174bea 100644
--- a/krebs/3modules/retiolum-hosts.nix
+++ b/krebs/3modules/retiolum-hosts.nix
@@ -1,28 +1,8 @@
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 {
+{ config, pkgs, ... }: {
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))))
- }
- '';
+ trace "pkgs.retiolum-hosts is deprecated, use pkgs.krebs-hosts-retiolum instead"
+ pkgs.krebs-hosts-retiolum;
};
}