infra/nix/os/devices/167.233.1.14/system.nix

76 lines
1.7 KiB
Nix
Raw Normal View History

2023-03-08 19:13:59 +01:00
{ pkgs
, lib
, config
, ...
}:
let
2023-02-07 18:24:28 +01:00
keys = import ../../../variables/keys.nix;
2023-03-08 19:13:59 +01:00
in
{
# TASK: new device
2023-03-08 19:13:59 +01:00
networking.hostName = "sj-pvehtz0"; # Define your hostname.
# networking.domain = "";
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
# iperf3
5201
];
networking.firewall.logRefusedConnections = false;
networking.usePredictableInterfaceNames = false;
networking.interfaces.eth0 = {
mtu = 1400;
useDHCP = false;
2023-02-07 18:24:28 +01:00
ipv4.addresses = [
{
"address" = "167.233.1.14";
"prefixLength" = 29;
}
];
2023-03-08 19:13:59 +01:00
ipv6.addresses = [ ];
};
networking.defaultGateway = {
address = "167.233.1.9";
interface = "eth0";
};
networking.defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
2023-03-08 19:13:59 +01:00
networking.nameservers = [ "1.1.1.1" ];
networking.nat = {
enable = true;
2023-03-08 19:13:59 +01:00
internalInterfaces = [ "ve-+" ];
externalInterface = "eth0";
};
# Kubernetes
# services.kubernetes.roles = ["master" "node"];
# virtualization
2023-03-08 19:13:59 +01:00
virtualisation = { docker.enable = true; };
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
2023-03-08 19:13:59 +01:00
nix.gc = { automatic = true; };
networking.useHostResolvConf = true;
services.openssh.forwardX11 = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
2023-03-08 19:13:59 +01:00
system.stateVersion = "22.11"; # Did you read the comment?
}