Changes to nixops for clunk (but still broken)

This commit is contained in:
2021-02-26 09:30:38 -06:00
parent 4143610c0f
commit 3d4fb6c336
15 changed files with 130 additions and 120 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
hardware.bluetooth.enable = false;
network = {
networking = {
macvlans = {
intif0 = {
interface = "enp2s0";
+10 -2
View File
@@ -4,8 +4,14 @@ let
primary-ip = "10.0.0.1";
dns-proxy-ip = "10.0.0.2";
site-name = config.fudo.hosts.${config.instance.hostname}.site;
site = config.fudo.site.${site-name};
in {
fudo.local-network = {
fudo.local-network = let
site-name = config.fudo.hosts.${config.instance.hostname}.site;
site = config.fudo.sites.${site-name};
in {
# FIXME: think about this -- actual network config?
enable = true;
# NOTE: requests go:
@@ -19,6 +25,8 @@ in {
recursive-resolver = "${primary-ip} port 5353";
server-ip = primary-ip;
domain = "rus.selby.ca";
network = site.network;
dhcp-dynamic-network = site.dynamic-network;
};
networking = {
@@ -77,7 +85,7 @@ in {
# environment.systemPackages = with pkgs; [ dnsproxy ];
virtualization = {
virtualisation = {
docker = {
enable = true;
autoPrune.enable = true;
-30
View File
@@ -1,30 +0,0 @@
{ config, lib, pkgs, ... }:
let
hostname = config.instance.hostname;
host-config = config.fudo.hosts.${hostname};
external-interface = host-config.gateway-config.external-interface;
internal-interfaces = host-config.gateway-config.internal-interfaces;
in {
imports = [ ./server.nix ];
config = {
networking = {
nat = {
enable = true;
externalInterface = external-interface;
internalInterfaces = internal-interfaces;
};
firewall = {
enable = true;
trustedInterfaces = internal-interfaces;
interfaces."${external-interface}" = {
allowedTCPPorts = host-config.gateway-config.external-tcp-ports;
allowedUDPPorts = host-config.gateway-config.external-udp-ports;
};
};
};
};
}
+6
View File
@@ -5,6 +5,8 @@
seattle = {
gateway-v4 = "10.0.0.1";
nameservers = [ "10.0.0.1" ];
network = "10.0.0.0/16";
dynamic-network = "10.0.1.0/24";
timezone = "America/Los_Angeles";
gateway-host = "nostromo";
# FIXME: good idea?
@@ -39,6 +41,7 @@
portage = {
gateway-v4 = "208.81.3.113";
# gateway-v6 = "265:e200:d200:1::1";
network = "208.81.3.112/28";
nameservers = [ "1.1.1.1" "208.81.7.14" "2606:4700:4700::1111" ];
timezone = "America/Winnipeg";
};
@@ -46,12 +49,15 @@
russell = {
gateway-v4 = "10.0.0.1";
nameservers = [ "10.0.0.1" ];
network = "10.0.0.0/16";
dynamic-network = "10.0.1.0/24";
timezone = "America/Winnipeg";
gateway-host = "clunk";
};
joes-datacenter-0 = {
gateway-v4 = "172.86.179.17";
network = "FIXME";
nameservers = [ "1.1.1.1" "2606:4700:4700::1111" ];
timezone = "America/Winnipeg";
};