feat: use a host attribute to make the config less verbose/complex

This commit is contained in:
silver 2024-05-30 14:11:45 +01:00
parent e156b4ecaf
commit 54b43c9962
Signed by: silver
GPG key ID: 54E2C71918E93B74
14 changed files with 81 additions and 102 deletions

View file

@ -17,6 +17,10 @@ Notes: Used to have Agent Smith as a partner but it died (Ironically)
name = "agentjones";
ip_pub = "193.1.99.72";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
./hardware/RM001.nix
@ -46,10 +50,7 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
# keep the wired usb connection alive (front panel)

View file

@ -18,6 +18,10 @@ Notes:
name = "cadie";
ip_pub = "193.1.99.77";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/nextcloud.nix
@ -46,18 +50,12 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet_nextcloud = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
# this was causing a conflict for some reason

View file

@ -18,6 +18,10 @@ Notes:
name = "earth";
ip_pub = "193.1.99.79";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/skynet.ie.nix
@ -47,16 +51,10 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
}

View file

@ -19,6 +19,10 @@ Notes:
name = "galatea";
ip_pub = "193.1.99.111";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/ulfm.nix
@ -47,17 +51,11 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet_ulfm = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
}

View file

@ -18,7 +18,10 @@ Notes:
name = "gir";
ip_pub = "193.1.99.76";
hostname = "${name}.skynet.ie";
#hostname = ip_pub;
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/email.nix
@ -48,19 +51,13 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
# we use this to pass in teh relevent infomation to the
services.skynet_email = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
domain = "skynet.ie";
};
}

View file

@ -19,6 +19,10 @@ Notes: Each user has roughly 20gb os storage
name = "glados";
ip_pub = "193.1.99.75";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/gitlab.nix
@ -47,17 +51,11 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet_gitlab = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
}

View file

@ -19,7 +19,10 @@ Notes:
name = "kitt";
ip_pub = "193.1.99.74";
hostname = "${name}.skynet.ie";
#hostname = ip_pub;
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/ldap/server.nix
@ -54,18 +57,12 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet_ldap = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.discord_bot = {
@ -75,27 +72,18 @@ in {
services.skynet_vaultwarden = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet.prometheus = {
server = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
};
services.skynet.grafana = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
}

View file

@ -17,6 +17,10 @@ Notes:
name = "marvin";
ip_pub = "193.1.99.81";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
groups = [
"skynet-admins-linux"
@ -64,10 +68,7 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
# Put test services below this

View file

@ -18,6 +18,10 @@ Notes:
name = "neuromancer";
ip_pub = "193.1.99.80";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
./hardware/RM007.nix
@ -60,9 +64,6 @@ in {
services.skynet.backup = {
server.enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
}

View file

@ -19,6 +19,10 @@ Notes:
name = "optimus";
ip_pub = "193.1.99.112";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/games.nix
@ -47,17 +51,11 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet_games = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
host = host;
};
}

View file

@ -21,6 +21,10 @@ Notes: Does not host offical sites
# for internal network connectivity
ip_int = "193.1.99.82";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/skynet_users.nix
@ -49,15 +53,9 @@ in {
}
];
services.skynet.backup.host = {
ip = ip_pub;
name = name;
};
services.skynet.backup.host = host;
services.skynet_users = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
}

View file

@ -18,6 +18,10 @@ Notes: Using the server that used to be called Earth
name = "vendetta";
ip_pub = "193.1.99.120";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
./hardware/RM002.nix
@ -46,10 +50,7 @@ in {
};
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet.dns = {

View file

@ -17,6 +17,10 @@ Notes:
name = "vigil";
ip_pub = "193.1.99.109";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
];
@ -30,10 +34,7 @@ in {
};
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet.dns = {

View file

@ -18,6 +18,10 @@ Notes:
name = "wheatly";
ip_pub = "193.1.99.78";
hostname = "${name}.skynet.ie";
host = {
ip = ip_pub;
name = name;
};
in {
imports = [
../applications/gitlab_runner.nix
@ -46,10 +50,7 @@ in {
];
services.skynet.backup = {
host = {
ip = ip_pub;
name = name;
};
host = host;
};
services.skynet_gitlab_runner = {