2024-02-08 20:53:22 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
nodeName,
|
|
|
|
repoFlake,
|
|
|
|
...
|
|
|
|
}: let
|
2023-12-17 23:25:24 +01:00
|
|
|
localTcpPorts = [
|
|
|
|
22
|
|
|
|
|
|
|
|
# syncthing
|
|
|
|
22000
|
|
|
|
|
|
|
|
# iperf3
|
|
|
|
5201
|
|
|
|
];
|
|
|
|
|
|
|
|
localUdpPorts = [
|
|
|
|
# syncthing
|
|
|
|
22000
|
|
|
|
21027
|
|
|
|
];
|
2024-02-08 20:53:22 +01:00
|
|
|
in {
|
2023-05-23 18:11:30 +02:00
|
|
|
nix.settings = {
|
|
|
|
substituters = [
|
2023-04-15 12:21:22 +02:00
|
|
|
];
|
2023-05-23 18:11:30 +02:00
|
|
|
trusted-public-keys = [
|
2021-08-20 23:28:23 +02:00
|
|
|
];
|
|
|
|
};
|
2020-12-21 14:35:50 +01:00
|
|
|
|
2023-12-17 23:25:24 +01:00
|
|
|
nix.distributedBuilds = true;
|
|
|
|
nix.buildMachines = [
|
|
|
|
{
|
|
|
|
hostName = repoFlake.colmena.sj-bm-hostkey0.deployment.targetHost;
|
|
|
|
# TODO: make this a reference
|
|
|
|
sshUser = "nix-remote-builder";
|
|
|
|
protocol = "ssh-ng";
|
|
|
|
system = "x86_64-linux";
|
2024-01-18 14:59:17 +00:00
|
|
|
maxJobs = 32;
|
2023-12-17 23:25:24 +01:00
|
|
|
speedFactor = 100;
|
2024-02-08 20:53:22 +01:00
|
|
|
supportedFeatures = repoFlake.nixosConfigurations.steveej-t14.config.nix.settings.system-features ++ [];
|
2024-01-21 21:08:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
hostName = repoFlake.colmena.sj-bm-hostkey0.deployment.targetHost;
|
|
|
|
# TODO: make this a reference
|
|
|
|
sshUser = "nix-remote-builder";
|
|
|
|
protocol = "ssh-ng";
|
|
|
|
system = "aarch64-linux";
|
|
|
|
maxJobs = 32;
|
|
|
|
speedFactor = 100;
|
2024-02-08 20:53:22 +01:00
|
|
|
supportedFeatures = repoFlake.nixosConfigurations.router0-dmz0.config.nix.settings.system-features ++ [];
|
2023-12-17 23:25:24 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2024-01-22 22:45:42 +00:00
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
2023-07-05 15:55:04 +02:00
|
|
|
networking.extraHosts = ''
|
|
|
|
'';
|
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
networking.bridges."virbr1".interfaces = [];
|
2023-02-07 18:23:51 +01:00
|
|
|
networking.interfaces."virbr1".ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = "10.254.254.254";
|
|
|
|
prefixLength = 24;
|
|
|
|
}
|
|
|
|
];
|
2020-12-21 14:35:50 +01:00
|
|
|
|
2023-08-22 10:20:16 +02:00
|
|
|
# needed to make wireguard managed by networkmanager route all traffic through it
|
|
|
|
networking.firewall.checkReversePath = false;
|
|
|
|
|
2020-12-21 14:35:50 +01:00
|
|
|
networking.firewall.enable = true;
|
2023-05-21 11:58:57 +02:00
|
|
|
services.openssh.openFirewall = false;
|
|
|
|
|
|
|
|
# TODO: upstream feature for inverse rule to work: `! --in-interface zt+`
|
2023-12-17 23:25:24 +01:00
|
|
|
networking.firewall.interfaces."eth+".allowedTCPPorts = localTcpPorts;
|
|
|
|
networking.firewall.interfaces."eth+".allowedUDPPorts = localUdpPorts;
|
|
|
|
networking.firewall.interfaces."wlan+".allowedTCPPorts = localTcpPorts;
|
|
|
|
networking.firewall.interfaces."wlan+".allowedUDPPorts = localUdpPorts;
|
2023-10-01 11:10:55 +02:00
|
|
|
|
2020-12-21 14:35:50 +01:00
|
|
|
networking.firewall.logRefusedConnections = false;
|
|
|
|
networking.usePredictableInterfaceNames = false;
|
|
|
|
|
2023-04-15 12:21:22 +02:00
|
|
|
services.fwupd.enable = true;
|
2020-12-21 14:35:50 +01:00
|
|
|
|
|
|
|
services.fprintd.enable = true;
|
|
|
|
security.pam.services = {
|
|
|
|
login.fprintAuth = true;
|
|
|
|
sudo.fprintAuth = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# virtualization
|
|
|
|
virtualisation = {
|
2024-02-08 20:53:22 +01:00
|
|
|
libvirtd = {enable = true;};
|
2020-12-21 14:35:50 +01:00
|
|
|
|
|
|
|
virtualbox.host = {
|
2022-10-31 11:04:38 +01:00
|
|
|
enable = false;
|
2020-12-21 14:35:50 +01:00
|
|
|
addNetworkInterface = false;
|
|
|
|
};
|
|
|
|
|
2023-04-15 12:21:22 +02:00
|
|
|
podman = {
|
2020-12-21 14:35:50 +01:00
|
|
|
enable = true;
|
2023-04-15 12:21:22 +02:00
|
|
|
dockerCompat = true;
|
2023-05-21 11:58:57 +02:00
|
|
|
# defaultNetwork.dnsname.enable = true;
|
2020-12-21 14:35:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-10 17:49:31 +01:00
|
|
|
services.samba.extraConfig = ''
|
|
|
|
# client min protocol = NT1
|
|
|
|
'';
|
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
security.pki.certificateFiles = ["${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"];
|
2020-12-21 14:35:50 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
services.xserver.videoDrivers = lib.mkForce ["amdgpu"];
|
2020-12-21 14:35:50 +01:00
|
|
|
|
|
|
|
hardware.ledger.enable = true;
|
2023-05-21 11:58:57 +02:00
|
|
|
|
2023-08-10 21:45:49 +02:00
|
|
|
boot.binfmt.emulatedSystems = [
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
2020-12-21 14:35:50 +01:00
|
|
|
}
|