infra/nix/os/devices/steveej-t14/system.nix

123 lines
2.7 KiB
Nix
Raw Normal View History

2024-02-08 20:53:22 +01:00
{
pkgs,
lib,
config,
nodeName,
repoFlake,
...
}: let
localTcpPorts = [
22
# syncthing
22000
# iperf3
5201
];
localUdpPorts = [
# syncthing
22000
21027
];
2024-02-08 20:53:22 +01:00
in {
nix.settings = {
substituters = [
];
trusted-public-keys = [
];
};
2020-12-21 14:35:50 +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;
speedFactor = 100;
2024-02-08 20:53:22 +01:00
supportedFeatures = repoFlake.nixosConfigurations.steveej-t14.config.nix.settings.system-features ++ [];
}
{
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 ++ [];
}
];
networking.networkmanager.enable = true;
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;
services.openssh.openFirewall = false;
# TODO: upstream feature for inverse rule to work: `! --in-interface zt+`
networking.firewall.interfaces."eth+".allowedTCPPorts = localTcpPorts;
networking.firewall.interfaces."eth+".allowedUDPPorts = localUdpPorts;
networking.firewall.interfaces."wlan+".allowedTCPPorts = localTcpPorts;
networking.firewall.interfaces."wlan+".allowedUDPPorts = localUdpPorts;
2020-12-21 14:35:50 +01:00
networking.firewall.logRefusedConnections = false;
networking.usePredictableInterfaceNames = false;
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;
};
podman = {
2020-12-21 14:35:50 +01:00
enable = true;
dockerCompat = true;
# defaultNetwork.dnsname.enable = true;
2020-12-21 14:35:50 +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;
boot.binfmt.emulatedSystems = [
"aarch64-linux"
];
2020-12-21 14:35:50 +01:00
}