Local changes

This commit is contained in:
Niten 2021-04-12 22:15:13 -07:00
parent 0158667056
commit f99759d5cb
5 changed files with 18 additions and 13 deletions

View File

@ -36,13 +36,8 @@ in {
}; };
# FIXME: this should be automatic # FIXME: this should be automatic
firewall.trustedInterfaces = [ firewall.trustedInterfaces =
"intif0" [ "intif0" "intif1" "intif2" "lo" "docker0" ];
"intif1"
"intif2"
"lo"
"docker0"
];
nat = { nat = {
enable = true; enable = true;

View File

@ -55,10 +55,13 @@ in {
''; '';
}; };
fail2ban = { fail2ban =
enable = config.networking.firewall.enable; let domain-name = config.fudo.hosts.${config.instance.hostname}.domain;
bantime-increment.enable = true; in {
}; enable = config.networking.firewall.enable;
bantime-increment.enable = true;
ignoreIP = config.fudo.domains.${domain-name}.local-networks;
};
xserver = { xserver = {
layout = "us"; layout = "us";

View File

@ -21,6 +21,7 @@
speed-factor = 2; speed-factor = 2;
}; };
}; };
enable-distributed-builds = true;
# FIXME: good idea? # FIXME: good idea?
# network-mounts = { # network-mounts = {
# "/mnt/documents" = { # "/mnt/documents" = {

View File

@ -183,7 +183,7 @@ in {
nix = mkIf nix = mkIf
(has-build-servers && has-build-keys && site.enable-distributed-builds) { (has-build-servers && has-build-keys && site.enable-distributed-builds) {
buildMachines = mapAttrsToList (hostname: buildOpts: { buildMachines = mapAttrsToList (hostname: buildOpts: {
hostName = "${hostname}.${domain}"; hostName = "${hostname}.${domain-name}";
maxJobs = buildOpts.max-jobs; maxJobs = buildOpts.max-jobs;
speedFactor = buildOpts.speed-factor; speedFactor = buildOpts.speed-factor;
supportedFeatures = buildOpts.supported-features; supportedFeatures = buildOpts.supported-features;

View File

@ -133,6 +133,12 @@ let
description = "User as which to run builds."; description = "User as which to run builds.";
default = "nix-site-builder"; default = "nix-site-builder";
}; };
local-networks = mkOption {
type = listOf str;
description = "List of networks to consider local at this site.";
default = [ ];
};
}; };
}; };