2023-11-20 16:10:09 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
Name: https://en.wikipedia.org/wiki/Marvin_the_Paranoid_Android
|
|
|
|
Why: Has terrible pain in all the diodes down its left side
|
|
|
|
Type: VM
|
|
|
|
Hardware: -
|
|
|
|
From: 2023
|
|
|
|
Role: For trainees.
|
|
|
|
Notes:
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
nodes,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
name = "marvin";
|
|
|
|
ip_pub = "193.1.99.81";
|
|
|
|
hostname = "${name}.skynet.ie";
|
2024-05-30 13:11:45 +00:00
|
|
|
host = {
|
|
|
|
ip = ip_pub;
|
|
|
|
name = name;
|
2024-05-30 16:55:29 +00:00
|
|
|
hostname = hostname;
|
2024-05-30 13:11:45 +00:00
|
|
|
};
|
2023-11-20 20:12:11 +00:00
|
|
|
|
|
|
|
groups = [
|
|
|
|
"skynet-admins-linux"
|
|
|
|
"skynet-trainees-linux"
|
|
|
|
];
|
|
|
|
groups_trusted = map (x: "@${x}") groups;
|
2023-11-20 16:10:09 +00:00
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
];
|
|
|
|
|
|
|
|
deployment = {
|
|
|
|
targetHost = hostname;
|
|
|
|
targetPort = 22;
|
|
|
|
targetUser = null;
|
|
|
|
|
|
|
|
# not deployed automatically as its a test server
|
|
|
|
tags = [];
|
|
|
|
};
|
|
|
|
|
|
|
|
# allow trainees to deploy
|
2023-11-20 20:12:11 +00:00
|
|
|
nix.settings.trusted-users =
|
|
|
|
[
|
|
|
|
"root"
|
|
|
|
]
|
|
|
|
++ groups_trusted;
|
2023-11-20 16:10:09 +00:00
|
|
|
|
|
|
|
# allow trainees access
|
2024-05-30 13:59:20 +00:00
|
|
|
services.skynet.ldap_client = {
|
2023-11-20 20:12:11 +00:00
|
|
|
groups = groups;
|
|
|
|
sudo_groups = groups;
|
|
|
|
};
|
2023-11-20 16:10:09 +00:00
|
|
|
|
2024-05-30 16:55:29 +00:00
|
|
|
services.skynet = {
|
2024-05-30 13:11:45 +00:00
|
|
|
host = host;
|
2024-05-30 16:55:29 +00:00
|
|
|
backup.enable = true;
|
2023-11-20 16:10:09 +00:00
|
|
|
};
|
|
|
|
}
|