From 6412a53070aec2d1a93b0b15e426e828ca5ba9c2 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sat, 15 Jul 2023 15:05:57 +0100 Subject: [PATCH] fmt: a bit of a cleanup --- applications/email.nix | 11 ++++------- applications/gitlab_runner.nix | 4 +++- machines/agentjones.nix | 7 +++++++ machines/galatea.nix | 10 ++++++---- machines/gir.nix | 12 +++++++----- machines/glados.nix | 23 +++++++++++++---------- machines/kitt.nix | 12 +++++++----- machines/neuromancer.nix | 11 +---------- machines/optimus.nix | 11 +++++++---- machines/vendetta.nix | 7 +++++++ machines/vigil.nix | 7 +++++++ machines/wheatly.nix | 9 ++++++--- 12 files changed, 75 insertions(+), 49 deletions(-) diff --git a/applications/email.nix b/applications/email.nix index 621f21b..c7719ba 100644 --- a/applications/email.nix +++ b/applications/email.nix @@ -87,13 +87,10 @@ }; config = mkIf cfg.enable { - services.skynet_backup = { - normal.backups = [ - "/var/vmail" - "/var/dkim" - ]; - host = { ip = cfg.host.ip; name = cfg.host.name; }; - }; + services.skynet_backup.normal.backups = [ + "/var/vmail" + "/var/dkim" + ]; age.secrets.ldap_pw.file = ../secrets/ldap/pw.age; diff --git a/applications/gitlab_runner.nix b/applications/gitlab_runner.nix index 601aecf..7c60450 100644 --- a/applications/gitlab_runner.nix +++ b/applications/gitlab_runner.nix @@ -43,7 +43,9 @@ config = mkIf cfg.enable { # https://search.nixos.org/options?from=0&size=50&sort=alpha_desc&type=packages&query=services.gitlab-runner. - + environment.systemPackages = [ + pkgs.gitlab-runner + ]; age.secrets."${cfg.runner.name}".file = ../secrets/gitlab/runners/${cfg.runner.name}.age; diff --git a/machines/agentjones.nix b/machines/agentjones.nix index 19cae98..5eb9254 100644 --- a/machines/agentjones.nix +++ b/machines/agentjones.nix @@ -41,6 +41,13 @@ in { ]; }; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; + # keep the wired usb connection alive (front panel) networking.interfaces.enp0s29u1u5u2.useDHCP = true; diff --git a/machines/galatea.nix b/machines/galatea.nix index dde7ad3..3e23ab4 100644 --- a/machines/galatea.nix +++ b/machines/galatea.nix @@ -39,15 +39,17 @@ in { ]; }; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; services.skynet_ulfm = { enable = true; - host = { - # pass in teh ip (used for firewall) ip = ip_pub; - - # the name is used for dns name = name; }; }; diff --git a/machines/gir.nix b/machines/gir.nix index 5b28030..4959b72 100644 --- a/machines/gir.nix +++ b/machines/gir.nix @@ -42,18 +42,20 @@ in { ]; }; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; + # we use this to pass in teh relevent infomation to the services.skynet_email = { enable = true; - host = { - # pass in teh ip (used for firewall) ip = ip_pub; - - # the name is used for dns name = name; }; - domain = "ulcompsoc.ie"; }; } diff --git a/machines/glados.nix b/machines/glados.nix index 8016a99..e833b1a 100644 --- a/machines/glados.nix +++ b/machines/glados.nix @@ -42,16 +42,19 @@ in { ]; }; - services.skynet_gitlab = { - enable = true; - - host = { - # pass in teh ip (used for firewall) - ip = ip_pub; - - # the name is used for dns - name = name; - }; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; }; + }; + + services.skynet_gitlab = { + enable = true; + host = { + ip = ip_pub; + name = name; + }; + }; } \ No newline at end of file diff --git a/machines/kitt.nix b/machines/kitt.nix index 5c6c268..46f6515 100644 --- a/machines/kitt.nix +++ b/machines/kitt.nix @@ -42,15 +42,17 @@ in { ]; }; - # we use this to pass in teh relevent infomation to the + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; + services.skynet_ldap = { enable = true; - host = { - # pass in teh ip (used for firewall) ip = ip_pub; - - # the name is used for dns name = name; }; }; diff --git a/machines/neuromancer.nix b/machines/neuromancer.nix index 8c3dba8..920bcf2 100644 --- a/machines/neuromancer.nix +++ b/machines/neuromancer.nix @@ -54,20 +54,11 @@ in { }; services.skynet_backup = { - normal.backups = [ - #"/etc/skynet" - ]; - - + server.enable = true; host = { ip = ip_pub; name = name; }; - - server = { - enable = true; - }; - }; } \ No newline at end of file diff --git a/machines/optimus.nix b/machines/optimus.nix index a72d2c0..f2bd9c0 100644 --- a/machines/optimus.nix +++ b/machines/optimus.nix @@ -40,14 +40,17 @@ in { ]; }; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; + services.skynet_games = { enable = true; - host = { - # pass in teh ip (used for firewall) ip = ip_pub; - - # the name is used for dns name = name; }; }; diff --git a/machines/vendetta.nix b/machines/vendetta.nix index f0afe73..8a5080e 100644 --- a/machines/vendetta.nix +++ b/machines/vendetta.nix @@ -48,6 +48,13 @@ in { }; }; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; + skynet_dns = { enable = true; diff --git a/machines/vigil.nix b/machines/vigil.nix index 82fb7b6..2ac1551 100644 --- a/machines/vigil.nix +++ b/machines/vigil.nix @@ -32,6 +32,13 @@ in { tags = [ "active" "dns" ]; }; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; + skynet_dns = { enable = true; diff --git a/machines/wheatly.nix b/machines/wheatly.nix index 45d41f6..b5e0d50 100644 --- a/machines/wheatly.nix +++ b/machines/wheatly.nix @@ -41,9 +41,12 @@ in { ]; }; - environment.systemPackages = [ - pkgs.gitlab-runner - ]; + services.skynet_backup = { + host = { + ip = ip_pub; + name = name; + }; + }; services.skynet_gitlab_runner = { enable = true;