summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-07-10 20:46:12 +0200
committertv <tv@shackspace.de>2015-07-10 20:46:12 +0200
commit2efbe1415ce7ba64dc67d66b7bc4eb274b91df71 (patch)
tree61a330bea5152fdb35113657219c0f72144ec19f
parentb49fb90be3959d77f8fe1d7ccc84751b04ff48cf (diff)
tv.identity: init
-rw-r--r--modules/cd/default.nix9
-rw-r--r--modules/mkdir/default.nix9
-rw-r--r--modules/nomic/default.nix7
-rw-r--r--modules/rmdir/default.nix9
-rw-r--r--modules/tv/identity/default.nix71
-rw-r--r--modules/wu/default.nix7
6 files changed, 109 insertions, 3 deletions
diff --git a/modules/cd/default.nix b/modules/cd/default.nix
index b36355671..dcaea74b4 100644
--- a/modules/cd/default.nix
+++ b/modules/cd/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ config, pkgs, ... }:
let
inherit (builtins) readFile;
@@ -17,6 +17,13 @@ in
../tv/git/public.nix
../tv/sanitize.nix
{
+ imports = [ ../tv/identity ];
+ tv.identity = {
+ enable = true;
+ self = config.tv.identity.hosts.cd;
+ };
+ }
+ {
imports = [ ../tv/iptables ];
tv.iptables = {
enable = true;
diff --git a/modules/mkdir/default.nix b/modules/mkdir/default.nix
index f2b32f7ec..e4c8343d3 100644
--- a/modules/mkdir/default.nix
+++ b/modules/mkdir/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ config, pkgs, ... }:
let
inherit (builtins) readFile;
@@ -16,6 +16,13 @@ in
../tv/git/public.nix
../tv/sanitize.nix
{
+ imports = [ ../tv/identity ];
+ tv.identity = {
+ enable = true;
+ self = config.tv.identity.hosts.mkdir;
+ };
+ }
+ {
imports = [ ../tv/iptables ];
tv.iptables = {
enable = true;
diff --git a/modules/nomic/default.nix b/modules/nomic/default.nix
index 88dcd0ca8..6f9c9e9fa 100644
--- a/modules/nomic/default.nix
+++ b/modules/nomic/default.nix
@@ -15,6 +15,13 @@ in
../tv/sanitize.nix
../tv/smartd.nix
{
+ imports = [ ../tv/identity ];
+ tv.identity = {
+ enable = true;
+ self = config.tv.identity.hosts.nomic;
+ };
+ }
+ {
imports = [ ../tv/iptables ];
tv.iptables = {
enable = true;
diff --git a/modules/rmdir/default.nix b/modules/rmdir/default.nix
index 26360b8cd..e9b694de5 100644
--- a/modules/rmdir/default.nix
+++ b/modules/rmdir/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ config, pkgs, ... }:
let
inherit (builtins) readFile;
@@ -16,6 +16,13 @@ in
../tv/git/public.nix
../tv/sanitize.nix
{
+ imports = [ ../tv/identity ];
+ tv.identity = {
+ enable = true;
+ self = config.tv.identity.hosts.rmdir;
+ };
+ }
+ {
imports = [ ../tv/iptables ];
tv.iptables = {
enable = true;
diff --git a/modules/tv/identity/default.nix b/modules/tv/identity/default.nix
new file mode 100644
index 000000000..7cf90de01
--- /dev/null
+++ b/modules/tv/identity/default.nix
@@ -0,0 +1,71 @@
+{ lib, ... }:
+
+with lib;
+
+let
+
+ cfg = config.tv.identity;
+
+ out = {
+ options.tv.identity = api;
+ #config = mkIf cfg.enable imp;
+ };
+
+ api = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ };
+ self = mkOption {
+ type = types.unspecified;
+ };
+ hosts = mkOption {
+ type = with types; attrsOf unspecified;
+ default = {
+ cd = {
+ #dc = "cac";
+ dc = "tv";
+ fqdn = "cd.retiolum";
+ addr = "10.243.113.222";
+ #addr6 = "42:4522:25f8:36bb:8ccb:0150:231a:2af3";
+ #internet-addr = "162.219.5.183";
+ cores = 2;
+ };
+ mkdir = {
+ #dc = "cac";
+ dc = "tv";
+ fqdn = "mkdir.retiolum";
+ addr = "10.243.113.223";
+ cores = 1;
+ };
+ nomic = {
+ #dc = "gg";
+ dc = "tv";
+ fqdn = "nomic.retiolum";
+ addr = "10.243.0.110";
+ cores = 2;
+ };
+ rmdir = {
+ #dc = "cac";
+ dc = "tv";
+ fqdn = "rmdir.retiolum";
+ addr = "10.243.113.224";
+ #addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af5";
+ cores = 1;
+ };
+ wu = {
+ #dc = "gg";
+ dc = "tv";
+ fqdn = "wu.retiolum";
+ addr = "10.243.13.37";
+ cores = 8;
+ };
+ };
+ };
+ };
+
+ #imp = {
+ #};
+
+in
+out
diff --git a/modules/wu/default.nix b/modules/wu/default.nix
index 8dd46e076..10438bbc0 100644
--- a/modules/wu/default.nix
+++ b/modules/wu/default.nix
@@ -17,6 +17,13 @@ in
../tv/xserver.nix
../wu/users.nix
{
+ imports = [ ../tv/identity ];
+ tv.identity = {
+ enable = true;
+ self = config.tv.identity.hosts.wu;
+ };
+ }
+ {
imports = [ ../tv/iptables ];
tv.iptables = {
enable = true;