summaryrefslogtreecommitdiffstats
path: root/3modules/tv/identity.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-07-23 01:02:36 +0200
committertv <tv@shackspace.de>2015-07-23 01:02:36 +0200
commit8e41a4be471cd9bb74c8667140a70f8c05c363d4 (patch)
tree0771b61bf7eeeb25d2a317842f1a1f17f48a6f29 /3modules/tv/identity.nix
parent504b1b90e809934a01357450ccdf35c4e4afc74d (diff)
* tv identity: hosts.*.search -> search
Diffstat (limited to '3modules/tv/identity.nix')
-rw-r--r--3modules/tv/identity.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/3modules/tv/identity.nix b/3modules/tv/identity.nix
index 0b94dff85..584b27165 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