diff options
author | tv <tv@krebsco.de> | 2015-07-10 20:46:12 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-07-10 20:46:12 +0200 |
commit | c1bc5ac84cb7705257113d607ec2791ebdb7403d (patch) | |
tree | af3942f95c0f932d55b096663c7f4bba2f97f649 /modules | |
parent | 9177dc3704967f58b15a24742d22c9d696f105e7 (diff) |
tv.identity: init
Diffstat (limited to 'modules')
-rw-r--r-- | modules/cd/default.nix | 9 | ||||
-rw-r--r-- | modules/mkdir/default.nix | 9 | ||||
-rw-r--r-- | modules/nomic/default.nix | 7 | ||||
-rw-r--r-- | modules/rmdir/default.nix | 9 | ||||
-rw-r--r-- | modules/tv/identity/default.nix | 71 | ||||
-rw-r--r-- | modules/wu/default.nix | 7 |
6 files changed, 109 insertions, 3 deletions
diff --git a/modules/cd/default.nix b/modules/cd/default.nix index b363556..dcaea74 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 f2b32f7..e4c8343 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 88dcd0c..6f9c9e9 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 26360b8..e9b694d 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 0000000..7cf90de --- /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 8dd46e0..10438bb 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; |