From 9ac74c1c8625cf0f9a06ceb7ca5b4a60e31390cb Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sun, 5 Jan 2025 19:13:24 +0000 Subject: [PATCH] feat: added example machiene --- machines/_template.nix | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 machines/_template.nix diff --git a/machines/_template.nix b/machines/_template.nix new file mode 100644 index 0000000..36a1189 --- /dev/null +++ b/machines/_template.nix @@ -0,0 +1,56 @@ +/* +Name: Link to where information on the name can be found +Why: Why is it named this +Type: VM/Physical +Hardware: - if its a VM, the hardware (PowerEdge r210) if its physical +From: 2023/2024/2025/... +Role: What role does it have in teh cluster +Notes: +*/ +{ + pkgs, + lib, + nodes, + ... +}: let + # name of the server, sets teh hostname and record for it + name = "name"; + # Assigned IP address + ip_pub = "193.1.99.000"; + + # dont need to change these + hostname = "${name}.skynet.ie"; + host = { + ip = ip_pub; + name = name; + hostname = hostname; + }; +in { + # what configurrations to import, email in this example + imports = [ + ../applications/email.nix + ]; + + deployment = { + # dont need to change these + targetHost = hostname; + targetPort = 22; + targetUser = null; + + # deployment option: active-dns/active-core/active-ext/active + tags = [ + "active" + ]; + }; + + services.skynet = { + # pass in the details of the host server + host = host; + + # enable the backup service + backup.enable = true; + + # enable the imported service + email.enable = true; + }; +}