summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--2configs/tv/identity.nix6
-rw-r--r--3modules/tv/identity.nix14
-rw-r--r--4lib/tv/default.nix6
3 files changed, 10 insertions, 16 deletions
diff --git a/2configs/tv/identity.nix b/2configs/tv/identity.nix
index 312c59d8d..36b387cdd 100644
--- a/2configs/tv/identity.nix
+++ b/2configs/tv/identity.nix
@@ -4,6 +4,7 @@
imports = [ ../../3modules/tv/identity.nix ];
tv.identity = {
enable = true;
+ search = "retiolum";
hosts = {
cd = {
cores = 2;
@@ -27,7 +28,6 @@
];
};
};
- search = "retiolum";
};
mkdir = {
cores = 1;
@@ -41,7 +41,6 @@
];
};
};
- search = "retiolum";
};
nomic = {
cores = 2;
@@ -55,7 +54,6 @@
];
};
};
- search = "retiolum";
};
rmdir = {
cores = 1;
@@ -70,7 +68,6 @@
];
};
};
- search = "retiolum";
};
wu = {
cores = 4;
@@ -84,7 +81,6 @@
];
};
};
- search = "retiolum";
};
};
};
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
diff --git a/4lib/tv/default.nix b/4lib/tv/default.nix
index 6985baa90..c134745d6 100644
--- a/4lib/tv/default.nix
+++ b/4lib/tv/default.nix
@@ -39,9 +39,6 @@ builtins // lib // rec {
in
xsn >= sn && substring (xsn - sn) sn xs == s ;
- removeSuffix =
- s : xs : substring 0 (stringLength xs - stringLength s) xs;
-
# setMap :: (String -> a -> b) -> Set String a -> [b]
#setMap = f: xs: map (k : f k (getAttr k xs)) (attrNames xs);
@@ -74,9 +71,6 @@ builtins // lib // rec {
type = attrsOf net;
apply = x: assert hasAttr "retiolum" x; x;
};
- search = mkOption {
- type = hostname;
- };
};
};