2022-02-09 11:09:49 +00:00
|
|
|
{ config, pkgs, ... } @ args:
|
|
|
|
|
|
|
|
{
|
|
|
|
deuxfleurs.cluster_name = "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
|
|
|
|
deuxfleurs.cluster_prefix = "10.14.0.0";
|
|
|
|
deuxfleurs.cluster_prefix_length = 16;
|
2022-04-20 16:04:57 +00:00
|
|
|
|
2022-08-23 21:55:15 +00:00
|
|
|
deuxfleurs.cluster_nodes = [
|
|
|
|
{
|
|
|
|
hostname = "cariacou";
|
|
|
|
site_name = "neptune";
|
|
|
|
publicKey = "qxrtfn2zRVnN52Y5NYumyU3/FcRMnh3kJ2C37JfrczA=";
|
2022-08-23 22:07:08 +00:00
|
|
|
IP = "10.14.1.1";
|
2022-08-23 21:55:15 +00:00
|
|
|
lan_endpoint = "192.168.1.21:33799";
|
|
|
|
endpoint = "192.168.1.21:33799"; ## TODO nat
|
|
|
|
}
|
|
|
|
{
|
|
|
|
hostname = "carcajou";
|
|
|
|
site_name = "neptune";
|
|
|
|
publicKey = "7Nm7pMmyS7Nts1MB+loyD8u84ODxHPTkDu+uqQR6yDk=";
|
2022-08-23 22:07:08 +00:00
|
|
|
IP = "10.14.1.2";
|
2022-08-23 21:55:15 +00:00
|
|
|
lan_endpoint = "192.168.1.22:33799";
|
|
|
|
endpoint = "192.168.1.22:33799"; ## TODO nat
|
|
|
|
}
|
|
|
|
{
|
|
|
|
hostname = "caribou";
|
|
|
|
site_name = "neptune";
|
2022-11-03 18:25:28 +00:00
|
|
|
publicKey = "lABn/axzD1jkFulX8c+K3B3CbKXORlIMDDoe8sQVxhs=";
|
2022-08-23 22:07:08 +00:00
|
|
|
IP = "10.14.1.3";
|
2022-08-23 21:55:15 +00:00
|
|
|
lan_endpoint = "192.168.1.23:33799";
|
|
|
|
endpoint = "192.168.1.23:33799"; ## TODO nat
|
|
|
|
}
|
|
|
|
];
|
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.1" # cariacou
|
|
|
|
"10.14.1.2" # carcajou
|
|
|
|
"10.14.1.3" # caribou
|
2022-02-09 11:09:49 +00:00
|
|
|
];
|
2022-04-20 16:04:57 +00:00
|
|
|
|
2022-02-09 11:09:49 +00:00
|
|
|
deuxfleurs.admin_accounts = {
|
|
|
|
lx = [
|
|
|
|
# Keys for accessing nodes from outside
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJpaBZdYxHqMxhv2RExAOa7nkKhPBOHupMP3mYaZ73w9 lx@lindy"
|
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"
|
|
|
|
];
|
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"
|
|
|
|
];
|
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
|
|
|
|
|
|
|
## -----
|
|
|
|
|
|
|
|
## EXPERIMENTAL ON STAGING: NIX NOMAD DRIVER
|
|
|
|
services.nomad.dropPrivileges = false;
|
|
|
|
services.nomad.extraPackages = [
|
|
|
|
pkgs.nix
|
|
|
|
pkgs.git
|
|
|
|
];
|
|
|
|
services.nomad.extraSettingsPlugins =
|
|
|
|
let nomad_driver_nix = import ./nomad-driver-nix.nix { inherit pkgs; };
|
|
|
|
in [ nomad_driver_nix ];
|
|
|
|
|
|
|
|
# the nix driver requires flakes to be enabled
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
# use our cache as additionnal substituer (we put precompiled packages there,
|
|
|
|
# like we used to do on the docker hub)
|
|
|
|
nix.settings.substituters = [ "https://nix.web.deuxfleurs.fr" ];
|
|
|
|
nix.settings.trusted-public-keys = [ "nix.web.deuxfleurs.fr:eTGL6kvaQn6cDR/F9lDYUIP9nCVR/kkshYfLDJf1yKs=" ];
|
2022-02-09 11:09:49 +00:00
|
|
|
}
|