2024-11-20 15:07:09 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkOption;
|
|
|
|
|
|
|
|
in
|
2024-11-20 15:04:48 +01:00
|
|
|
{
|
2024-11-20 15:07:09 +01:00
|
|
|
options = {
|
|
|
|
procolix.vm = {
|
|
|
|
name = mkOption { };
|
|
|
|
ip4 = mkOption { };
|
|
|
|
ip6 = mkOption { };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-20 15:04:48 +01:00
|
|
|
config = {
|
2024-11-20 13:29:44 +01:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
settings.PasswordAuthentication = false;
|
|
|
|
};
|
2024-11-20 15:04:48 +01:00
|
|
|
|
|
|
|
networking = {
|
2024-11-20 15:07:09 +01:00
|
|
|
hostName = config.procolix.vm.name;
|
2024-11-20 15:04:48 +01:00
|
|
|
domain = "procolix.com";
|
2024-11-20 15:51:09 +01:00
|
|
|
|
2024-11-20 15:04:48 +01:00
|
|
|
interfaces = {
|
|
|
|
eth0 = {
|
|
|
|
ipv4 = {
|
|
|
|
addresses = [
|
|
|
|
{
|
2024-11-20 15:07:09 +01:00
|
|
|
address = config.procolix.vm.ip4;
|
2024-11-20 15:04:48 +01:00
|
|
|
prefixLength = 24;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
ipv6 = {
|
|
|
|
addresses = [
|
|
|
|
{
|
2024-11-20 15:07:09 +01:00
|
|
|
address = config.procolix.vm.ip6;
|
2024-11-20 15:04:48 +01:00
|
|
|
prefixLength = 64;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-11-20 15:51:09 +01:00
|
|
|
|
2024-11-20 15:04:48 +01:00
|
|
|
defaultGateway = {
|
|
|
|
address = "185.206.232.1";
|
|
|
|
interface = "eth0";
|
|
|
|
};
|
|
|
|
defaultGateway6 = {
|
|
|
|
address = "2a00:51c0:12:1201::1";
|
|
|
|
interface = "eth0";
|
|
|
|
};
|
2024-11-20 15:51:09 +01:00
|
|
|
|
2024-11-20 15:04:48 +01:00
|
|
|
nameservers = [
|
2024-11-20 15:07:09 +01:00
|
|
|
"95.215.185.6"
|
2024-11-20 15:04:48 +01:00
|
|
|
"95.215.185.7"
|
2024-11-20 15:07:09 +01:00
|
|
|
"2a00:51c0::5fd7:b906"
|
2024-11-21 11:32:48 +01:00
|
|
|
"2a00:51c0::5fd7:b907"
|
2024-11-20 15:04:48 +01:00
|
|
|
];
|
2024-11-20 15:51:09 +01:00
|
|
|
|
2024-11-20 15:04:48 +01:00
|
|
|
firewall.enable = false;
|
|
|
|
nftables = {
|
|
|
|
enable = true;
|
2024-11-20 15:51:09 +01:00
|
|
|
rulesetFile = ./nftables-ruleset.nft;
|
2024-11-20 15:04:48 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|