diff options
-rw-r--r-- | krebs/3modules/tv/default.nix | 36 | ||||
-rw-r--r-- | krebs/4lib/types.nix | 1 |
2 files changed, 18 insertions, 19 deletions
diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index a37c26c4e..2d18a7e8d 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -7,11 +7,11 @@ with config.krebs.lib; "viljetic.de" = "regfish"; }; hosts = mapAttrs (_: setAttr "owner" config.krebs.users.tv) { - caxi = rec { + caxi = { cores = 2; extraZones = { "krebsco.de" = '' - caxi 60 IN A ${nets.internet.ip4.addr} + caxi 60 IN A ${config.krebs.hosts.caxi.nets.internet.ip4.addr} ''; }; nets = { @@ -27,7 +27,7 @@ with config.krebs.lib; ssh.port = 11423; }; retiolum = { - via = nets.internet; + via = config.krebs.hosts.caxi.nets.internet; ip4.addr = "10.243.113.226"; ip6.addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af6"; aliases = [ @@ -49,19 +49,19 @@ with config.krebs.lib; ssh.privkey.path = <secrets/ssh.id_ed25519>; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKdJ4xGi+qn4IfMZJ3Kv7AGZGbhlR+GrkD87z2tcyRZy"; }; - cd = rec { + cd = { cores = 2; extraZones = { # TODO generate krebsco.de zone from nets and don't use extraZones at all "krebsco.de" = '' krebsco.de. 60 IN MX 5 mx23 - mx23 60 IN A ${nets.internet.ip4.addr} - cd 60 IN A ${nets.internet.ip4.addr} - cgit 60 IN A ${nets.internet.ip4.addr} - cgit.cd 60 IN A ${nets.internet.ip4.addr} + mx23 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} + cd 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} + cgit 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} + cgit.cd 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} ''; }; - nets = rec { + nets = { internet = { ip4.addr = "45.62.237.203"; aliases = [ @@ -75,7 +75,7 @@ with config.krebs.lib; ssh.port = 11423; }; retiolum = { - via = internet; + via = config.krebs.hosts.cd.nets.internet; ip4.addr = "10.243.113.222"; ip6.addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af3"; aliases = [ @@ -138,14 +138,14 @@ with config.krebs.lib; }; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM6dL0fQ8Bd0hER0Xa3I2pAWVHdnwOBaAZhbDlLJmUu"; }; - ire = rec { + ire = { extraZones = { # TODO generate krebsco.de zone from nets and don't use extraZones at all "krebsco.de" = '' - ire 60 IN A ${nets.internet.ip4.addr} + ire 60 IN A ${config.krebs.hosts.ire.nets.internet.ip4.addr} ''; }; - nets = rec { + nets = { internet = { ip4.addr = "198.147.22.115"; aliases = [ @@ -156,7 +156,7 @@ with config.krebs.lib; ssh.port = 11423; }; retiolum = { - via = internet; + via = config.krebs.hosts.ire.nets.internet; ip4.addr = "10.243.231.66"; ip6.addr = "42:b912:0f42:a82d:0d27:8610:e89b:490c"; aliases = [ @@ -236,7 +236,7 @@ with config.krebs.lib; }; nomic = { cores = 2; - nets = rec { + nets = { gg23 = { ip4.addr = "10.23.1.110"; aliases = ["nomic.gg23"]; @@ -359,7 +359,7 @@ with config.krebs.lib; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPnjfceKuHNQu7S4eYFN1FqgzMqiL7haNZMh2ZLhvuhK root@xu"; }; }; - users = rec { + users = { mv = { mail = "mv@cd.r"; pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGer9e2+Lew7vnisgBbsFNECEIkpNJgEaqQqgb9inWkQ mv@vod"; @@ -371,11 +371,11 @@ with config.krebs.lib; uid = 1337; # TODO use default and document what has to be done (for vv) }; tv-nomic = { - inherit (tv) mail; + inherit (config.krebs.users.tv) mail; pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3dYR/n4Yw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xa4E1PFjDczHdQbVmmGMI80grNwMsHzQ6bynHSPXDoLf4WodXlhS0+9Ju5QavDT6uqZ9uhDBuWC8QNgWUMIJnEaTBFyA0OI1akl8Q2RLC+qnNf5IwItSq+GDwEsB2ZJNW3kOk1kNiCUrBafRYpPaFeP97wzzP4uYlBKAr2SOLrrkf7NFEdw2ihxhDMNnps/ErRJ8U0zdpmalw8mItGyqRULpHjk/wN00rYOdBIhW3G3QJuVgtGnWtGCBG5x70EfMiSEXPD3YSsVVsgKD+v8qr+YiilRRD+N3gaHhiOWA6HgxRNul/P4llk0ktTpb9LoHk2+oooTH5ZuuT/8yF8J4stZt7EIOH+mSOAXG1z0BwnEkQu7pVKwu/oOZpGJTvBrGwww== tv@xu"; }; vv = { diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 08db42c4c..aa7b7a9f5 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -76,7 +76,6 @@ types // rec { default = optional (config.ip4 != null) config.ip4.addr ++ optional (config.ip6 != null) config.ip6.addr; - readOnly = true; }; aliases = mkOption { # TODO nonEmptyListOf hostname |