From 8e41a4be471cd9bb74c8667140a70f8c05c363d4 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 23 Jul 2015 01:02:36 +0200 Subject: * tv identity: hosts.*.search -> search --- 3modules/tv/identity.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to '3modules/tv') diff --git a/3modules/tv/identity.nix b/3modules/tv/identity.nix index 0b94dff8..584b2716 100644 --- a/3modules/tv/identity.nix +++ b/3modules/tv/identity.nix @@ -16,15 +16,19 @@ let type = types.host; }; - others = mkOption { - type = types.host; - default = filterAttrs (name: _host: name != cfg.self.name) cfg.hosts; - }; + #others = mkOption { + # type = types.host; + # default = filterAttrs (name: _host: name != cfg.self.name) cfg.hosts; + #}; hosts = mkOption { type = with types; attrsOf host; apply = mapAttrs (name: value: value // { inherit name; }); }; + + search = mkOption { + type = types.hostname; + }; }; imp = { @@ -36,7 +40,7 @@ let let aliases = toString (unique (longs ++ shorts)); longs = (splitByProvider net.aliases).hosts; - shorts = map (removeSuffix ".${cfg.self.search}") longs; + shorts = map (removeSuffix ".${cfg.search}") longs; in map (addr: "${addr} ${aliases}") net.addrs ) host.nets -- cgit v1.2.3