summaryrefslogtreecommitdiffstats
path: root/tv/1systems/mkdir.nix
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-09-27 20:08:36 +0200
committerlassulus <lass@aidsballs.de>2015-09-27 20:08:36 +0200
commita9f6f7ac7b8e70633164d10980d1d041f34be3ac (patch)
tree13a8bdfafd994c999c5eeae3ff5e2537a4d96f0f /tv/1systems/mkdir.nix
parentb6383dba83a2e9ec6ada40fb780c15a56c8d715e (diff)
parentbc2bd6e2f6e9295b14e641b82bff62b40641988d (diff)
Merge branch 'makefu'
Diffstat (limited to 'tv/1systems/mkdir.nix')
-rw-r--r--tv/1systems/mkdir.nix42
1 files changed, 32 insertions, 10 deletions
diff --git a/tv/1systems/mkdir.nix b/tv/1systems/mkdir.nix
index cd3d3b5c4..76432ba03 100644
--- a/tv/1systems/mkdir.nix
+++ b/tv/1systems/mkdir.nix
@@ -2,22 +2,37 @@
with lib;
+let
+ # TODO merge with lass
+ getDefaultGateway = ip:
+ concatStringsSep "." (take 3 (splitString "." ip) ++ ["1"]);
+
+
+ primary-addr4 =
+ builtins.elemAt config.krebs.build.host.nets.internet.addrs4 0;
+
+ #secondary-addr4 =
+ # builtins.elemAt config.krebs.build.host.nets.internet.addrs4 1;
+in
+
{
krebs.build.host = config.krebs.hosts.mkdir;
krebs.build.user = config.krebs.users.tv;
- krebs.build.target = "root@mkdir.internet";
+ krebs.build.target = "root@${primary-addr4}";
- krebs.build.deps = {
- nixpkgs = {
+ krebs.build.source = {
+ git.nixpkgs = {
url = https://github.com/NixOS/nixpkgs;
- rev = "9d5508d85c33b8fb22d79dde6176792eac2c2696";
+ rev = "68bd8e4a9dc247726ae89cc8739574261718e328";
};
- secrets = {
- url = "/home/tv/secrets/${config.krebs.build.host.name}";
+ dir.secrets = {
+ host = config.krebs.hosts.wu;
+ path = "/home/tv/secrets/mkdir";
};
- stockholm = {
- url = toString ../..;
+ dir.stockholm = {
+ host = config.krebs.hosts.wu;
+ path = "/home/tv/stockholm";
};
};
@@ -56,11 +71,18 @@ with lib;
networking.interfaces.enp2s1.ip4 = [
{
- address = "162.248.167.241"; # TODO
+ address = primary-addr4;
prefixLength = 24;
}
+ #{
+ # address = secondary-addr4;
+ # prefixLength = 24;
+ #}
];
- networking.defaultGateway = "162.248.167.1";
+
+ # TODO define gateway in krebs/3modules/default.nix
+ networking.defaultGateway = getDefaultGateway primary-addr4;
+
networking.nameservers = [
"8.8.8.8"
];