2024-01-22 22:21:26 +00:00
|
|
|
{ config, pkgs, lib, ... } @ args:
|
2022-02-09 11:09:49 +00:00
|
|
|
|
|
|
|
{
|
2023-03-24 14:26:39 +00:00
|
|
|
deuxfleurs.clusterName = "staging";
|
2022-04-20 16:04:57 +00:00
|
|
|
|
2022-08-23 21:55:15 +00:00
|
|
|
# The IP range to use for the Wireguard overlay of this cluster
|
2023-03-24 14:26:39 +00:00
|
|
|
deuxfleurs.clusterPrefix = "10.14.0.0/16";
|
2022-04-20 16:04:57 +00:00
|
|
|
|
2023-03-24 14:26:39 +00:00
|
|
|
deuxfleurs.clusterNodes = {
|
|
|
|
"caribou" = {
|
|
|
|
siteName = "neptune";
|
2022-11-03 18:25:28 +00:00
|
|
|
publicKey = "lABn/axzD1jkFulX8c+K3B3CbKXORlIMDDoe8sQVxhs=";
|
2023-03-24 14:26:39 +00:00
|
|
|
address = "10.14.1.3";
|
2022-12-07 10:21:39 +00:00
|
|
|
endpoint = "77.207.15.215:33723";
|
2023-03-24 14:26:39 +00:00
|
|
|
};
|
|
|
|
"origan" = {
|
2024-06-27 14:15:14 +00:00
|
|
|
siteName = "dathomir";
|
2022-12-11 21:37:28 +00:00
|
|
|
publicKey = "smBQYUS60JDkNoqkTT7TgbpqFiM43005fcrT6472llI=";
|
2023-03-24 14:26:39 +00:00
|
|
|
address = "10.14.2.33";
|
2022-12-13 15:01:36 +00:00
|
|
|
endpoint = "82.64.238.84:33733";
|
2023-03-24 14:26:39 +00:00
|
|
|
};
|
|
|
|
"piranha" = {
|
|
|
|
siteName = "corrin";
|
2022-12-28 15:49:43 +00:00
|
|
|
publicKey = "m9rLf+233X1VColmeVrM/xfDGro5W6Gk5N0zqcf32WY=";
|
2023-03-24 14:26:39 +00:00
|
|
|
address = "10.14.3.1";
|
2023-03-09 15:39:58 +00:00
|
|
|
#endpoint = "82.120.233.78:33721";
|
2023-03-24 14:26:39 +00:00
|
|
|
};
|
|
|
|
"df-pw5" = {
|
|
|
|
siteName = "bespin";
|
2023-01-04 09:02:21 +00:00
|
|
|
publicKey = "XLOYoMXF+PO4jcgfSVAk+thh4VmWx0wzWnb0xs08G1s=";
|
2023-03-24 14:26:39 +00:00
|
|
|
address = "10.14.4.1";
|
2023-01-04 09:02:21 +00:00
|
|
|
endpoint = "bitfrost.fiber.shirokumo.net:33734";
|
2023-03-24 14:26:39 +00:00
|
|
|
};
|
|
|
|
};
|
2023-05-04 11:39:33 +00:00
|
|
|
|
|
|
|
deuxfleurs.wgautomeshPort = 1667;
|
2023-06-13 09:56:10 +00:00
|
|
|
deuxfleurs.services.wgautomesh.logLevel = "debug";
|
2022-04-20 16:04:57 +00:00
|
|
|
|
|
|
|
# Bootstrap IPs for Consul cluster,
|
2022-10-09 15:46:59 +00:00
|
|
|
# these are IPs on the Wireguard overlay
|
2022-04-20 16:04:57 +00:00
|
|
|
services.consul.extraConfig.retry_join = [
|
2022-08-23 22:07:08 +00:00
|
|
|
"10.14.1.3" # caribou
|
2023-04-19 18:36:24 +00:00
|
|
|
"10.14.2.33" # origan
|
|
|
|
"10.14.3.1" # piranha
|
2022-02-09 11:09:49 +00:00
|
|
|
];
|
2022-04-20 16:04:57 +00:00
|
|
|
|
2023-03-24 14:26:39 +00:00
|
|
|
deuxfleurs.adminAccounts = {
|
2022-02-09 11:09:49 +00:00
|
|
|
lx = [
|
2022-10-09 15:46:59 +00:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIw+IIX8+lZX9RrHAbwi/bncLYStXpI4EmK3AUcqPY2O lx@kusanagi "
|
2022-02-09 11:09:49 +00:00
|
|
|
];
|
|
|
|
quentin = [
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDT1+H08FdUSvdPpPKdcafq4+JRHvFVjfvG5Id97LAoROmFRUb/ZOMTLdNuD7FqvW0Da5CPxIMr8ZxfrFLtpGyuG7qdI030iIRZPlKpBh37epZHaV+l9F4ZwJQMIBO9cuyLPXgsyvM/s7tDtrdK1k7JTf2EVvoirrjSzBaMhAnhi7//to8zvujDtgDZzy6aby75bAaDetlYPBq2brWehtrf9yDDG9WAMYJqp//scje/WmhbRR6eSdim1HaUcWk5+4ZPt8sQJcy8iWxQ4jtgjqTvMOe5v8ZPkxJNBine/ZKoJsv7FzKem00xEH7opzktaGukyEqH0VwOwKhmBiqsX2yN quentin@dufour.io"
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBu+KUebaWwlugMC5fGbNhHc6IaQDAC6+1vMc4Ww7nVU1rs2nwI7L5qcWxOwNdhFaorZQZy/fJuCWdFbF61RCKGayBWPLZHGPsfqDuggYNEi1Qil1kpeCECfDQNjyMTK058ZBBhOWNMHBjlLWXUlRJDkRBBECY0vo4jRv22SvSaPUCAnkdJ9rbAp/kqb497PTIb2r1l1/ew8YdhINAlpYQFQezZVfkZdTKxt22n0QCjhupqjfh3gfNnbBX0z/iO+RvAOWRIZsjPFLC+jXl+n7cnu2cq1nvST5eHiYfXXeIgIwmeENLKqp+2Twr7PIdv22PnJkh6iR5kx7eTRxkNZdN quentin@deuxfleurs.fr"
|
|
|
|
];
|
|
|
|
adrien = [
|
2022-11-09 17:35:17 +00:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINvUFN6HmZS5oxxOtmF6ug393m5NYbSbDI4G8pX6H9GZ adrien@pratchett"
|
2022-02-09 11:09:49 +00:00
|
|
|
];
|
|
|
|
maximilien = [
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHMMR6zNzz8NQU80wFquhUCeiXJuGphjP+zNouKbn228GyESu8sfNBwnuZq86vblR11Lz8l2rtCM73GfAKg29qmUWUHRKWvRIYWv2vaUJcCdy0bAxIzcvCvjZX0SpnIKxe9y3Rp0LGO5WLYfw0ZFaavwFZP0Z8w1Kj9/zBmL2X2avbhkaYHi/C1yXhbvESYQysmqLa48EX/TS616MBrgR9zbI9AoTQ9NOHnR14Tve/AP/khcZoBJdm4hTttMbNkEc0wonzdylTDew263SPRs/uoqnQIpUtErdPHqU10Yup8HjXjEyFJsSwcZcM5sZOw5JKckKJwmcd0yjO/x/4/Mk5"
|
2023-06-24 15:14:34 +00:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGioTNbjGE3KblbqhnkEWUfGkYZ2p5UAVqPdQJaUBWoo"
|
2022-02-09 11:09:49 +00:00
|
|
|
];
|
2022-11-09 17:35:17 +00:00
|
|
|
trinity = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDWGWTRoF5MjQ5bmFdQENQlNdoYtA7Wd61GM0TMHZDki"
|
|
|
|
];
|
2022-02-09 11:09:49 +00:00
|
|
|
kokakiwi = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFPTsEgcOtb2bij+Ih8eg8ZqO7d3IMiWykv6deMzlSSS kokakiwi@kira"
|
|
|
|
];
|
2022-11-22 11:09:28 +00:00
|
|
|
baptiste = [
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnGkJZZrHIUp9q0DXmVLLuhCIe7Vu1J3j6dJ1z1BglqX7yOLdFQ6LhHXx65aND/KCOM1815tJSnaAyKWEj9qJ31RVUoRl42yBn54DvQumamJUaXAHqJrXhjwxfUkF9B73ZSUzHGADlQnxcBkmrjC5FkrpC/s4xr0o7/GIBkBdtZhX9YpxBfpH6wEcCruTOlm92E3HvvjpBb/wHsoxL1f2czvWe69021gqWEYRFjqtBwP36NYZnGOJZ0RrlP3wUrGCSHxOKW+2Su+tM6g07KPJn5l1wNJiOcyBQ0/Sv7ptCJ9+rTQNeVBMoXshaucYP/bKJbqH7dONrYDgz59C4+Kax"
|
|
|
|
];
|
2024-01-17 19:07:46 +00:00
|
|
|
aeddis = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILoFf9fMYwLOpmiXKgn4Rs99YCj94SU1V0gwGXR5N4Md"
|
|
|
|
];
|
|
|
|
boris = [
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPts/36UvMCFcx3anSMV8bQKGel4c4wCsdhDGWHzZHgg07DxMt+Wk9uv0hWkqLojkUbCl/bI5siftiEv6En0mHw="
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJaD6flgTLkKimMB1qukiLKLVqsN+gizgajETjTwbscXEP2Fajmqy+90v1eXTDcGivmTyi8wOqkJ0s4D7dWP7Ck="
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEIZKA/SIicXq7HPFJfumrMc1iARqA1TQWWuWLrguOlKgFPBVym/IVjtYGAQ/Xtv4wU9Ak0s+t9UKpQ/K38kVe0="
|
|
|
|
];
|
|
|
|
vincent = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEve02acr522psrPxeElkwIPw2pc6QWtsUVZoaigqwZZ"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL/h+rxR2o+vN0hUWQPdpO7YY9aaKxO3ZRnUh9QiKBE7"
|
|
|
|
];
|
2024-03-16 17:53:12 +00:00
|
|
|
armael = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJOoPghSM72AVp1zATgQzeLkuoGuP9uUTTAtwliyWoix"
|
|
|
|
];
|
|
|
|
marion = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKzOhSTEOudBWCHi5wHc6MP0xjJJhuIDZEcx+hP6kz9N"
|
|
|
|
];
|
|
|
|
darkgallium = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJX0A2P59or83EKhh32o8XumGz0ToTEsoq89hMbMtr7h"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB540H9kn+Ocs4Wjc1Y3f3OkHFYEqc5IM/FiCyoVVoh3"
|
|
|
|
];
|
2022-02-09 11:09:49 +00:00
|
|
|
};
|
2022-10-18 20:09:55 +00:00
|
|
|
|
|
|
|
# For Garage ipv6 communication
|
|
|
|
networking.firewall.allowedTCPPorts = [ 3991 ];
|
2022-11-16 23:17:56 +00:00
|
|
|
|
2022-12-02 10:59:32 +00:00
|
|
|
## ===== EXPERIMENTAL SECTION FOR STAGING CLUSTER =====
|
2022-11-16 23:17:56 +00:00
|
|
|
|
2024-01-22 22:21:26 +00:00
|
|
|
# Test nomad 1.6
|
2024-04-20 08:09:55 +00:00
|
|
|
services.nomad.package = pkgs.nomad_1_6;
|
2024-04-19 06:54:11 +00:00
|
|
|
nixpkgs.config.allowUnfree = true; # Accept nomad's BSL license
|
2024-01-22 22:21:26 +00:00
|
|
|
|
2022-12-02 10:59:32 +00:00
|
|
|
# We're doing lots of experiments so GC periodically is usefull.
|
|
|
|
nix.gc.automatic = true;
|
2022-11-28 21:58:39 +00:00
|
|
|
|
2022-12-02 10:59:32 +00:00
|
|
|
imports = [
|
|
|
|
## ---- Nix Nomad jobs using nomad-driver-nix2 ----
|
|
|
|
({ pkgs, ... }: {
|
|
|
|
services.nomad.extraSettingsPlugins = [
|
|
|
|
(import ./nomad-driver-nix2.nix { inherit pkgs; })
|
|
|
|
];
|
|
|
|
services.nomad.extraPackages = [
|
|
|
|
pkgs.nix
|
|
|
|
pkgs.git
|
|
|
|
];
|
|
|
|
services.nomad.settings.plugin = [
|
2022-11-28 21:58:39 +00:00
|
|
|
{
|
2022-12-02 10:59:32 +00:00
|
|
|
"nix2-driver" = [
|
2022-11-28 21:58:39 +00:00
|
|
|
{
|
2022-12-02 10:59:32 +00:00
|
|
|
config = [
|
|
|
|
{
|
2024-01-22 16:15:29 +00:00
|
|
|
default_nixpkgs = "github:nixos/nixpkgs/nixos-23.11";
|
2022-12-02 10:59:32 +00:00
|
|
|
}
|
|
|
|
];
|
2022-11-28 21:58:39 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
2022-12-02 10:59:32 +00:00
|
|
|
})
|
|
|
|
## ---- Nix cache: use our cache on Garage (prod cluster) ----
|
|
|
|
# Use our cache as additionnal substituer (this acts the same way for
|
|
|
|
# our Nix packages than the Docker hub acts for our Docker images)
|
|
|
|
({ pkgs, ... }: {
|
|
|
|
nix.settings.substituters = [ "https://nix.web.deuxfleurs.fr" ];
|
|
|
|
nix.settings.trusted-public-keys = [ "nix.web.deuxfleurs.fr:eTGL6kvaQn6cDR/F9lDYUIP9nCVR/kkshYfLDJf1yKs=" ];
|
|
|
|
})
|
2022-11-28 21:58:39 +00:00
|
|
|
];
|
2022-02-09 11:09:49 +00:00
|
|
|
}
|