nixos-config/configs/sputnik/configuration.nix

43 lines
840 B
Nix
Raw Normal View History

2019-12-20 05:54:26 +01:00
{ config, pkgs, lib, ... }: {
2019-10-24 02:20:38 +02:00
imports = [
<system/proxy>
./hardware-configuration.nix
./nginx.nix
./tinc.nix
# ./mail-server.nix
2019-10-24 02:20:38 +02:00
];
2019-12-20 05:54:26 +01:00
networking.hostName = "sputnik";
2019-10-24 02:20:38 +02:00
networking.useDHCP = true;
boot.kernelParams = [ "net.ifnames=0" ];
boot.loader.grub = {
2019-12-20 05:54:26 +01:00
enable = true;
2019-10-24 02:20:38 +02:00
version = 2;
2019-12-20 05:54:26 +01:00
device = "/dev/sda";
2019-10-24 02:20:38 +02:00
};
# nix-shell -p speedtest_cli --run speedtest
configuration.fireqos = {
enable = true;
interface = "eth0";
input = 55000;
output = 4000;
balance = false;
};
2019-12-20 05:54:26 +01:00
services.custom.ssh.sshd.rootKeyFiles =
[ (toString <secrets/ssh/jenkins_rsa.pub>) ];
2019-10-24 02:20:38 +02:00
# make sure ssh is only available trough the tinc
networking.firewall.extraCommands = ''
iptables -t nat -A PREROUTING ! -i tinc.private -p tcp -m tcp --dport 22 -j REDIRECT --to-ports 0
'';
}