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
firewall.trustedInterfaces = [
"intif0"
"intif1"
"intif2"
"lo"
"docker0"
];
firewall.trustedInterfaces =
[ "intif0" "intif1" "intif2" "lo" "docker0" ];
nat = {
enable = true;

View File

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

View File

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

View File

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

View File

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