59 lines
1.3 KiB
Nix
59 lines
1.3 KiB
Nix
{ pkgs
|
||
, lib
|
||
, config
|
||
, ... }:
|
||
|
||
let
|
||
keys = import ../../../variables/keys.nix;
|
||
|
||
in {
|
||
# TASK: new device
|
||
networking.hostName = "odroidh2p-0"; # Define your hostname.
|
||
# networking.domain = "";
|
||
|
||
networking.firewall.enable = true;
|
||
networking.firewall.allowedTCPPorts = [
|
||
# iperf3
|
||
5201
|
||
];
|
||
networking.firewall.logRefusedConnections = false;
|
||
|
||
networking.usePredictableInterfaceNames = false;
|
||
|
||
networking.useDHCP = false;
|
||
|
||
networking.interfaces.eth0 = {
|
||
useDHCP = true;
|
||
};
|
||
|
||
networking.interfaces.eth1 = {
|
||
useDHCP = false;
|
||
};
|
||
|
||
networking.nat = {
|
||
enable = true;
|
||
internalInterfaces = [ "ve-+" ];
|
||
externalInterface = "eth0";
|
||
};
|
||
|
||
# virtualization
|
||
virtualisation = {
|
||
docker.enable = true;
|
||
};
|
||
|
||
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. It‘s 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).
|
||
system.stateVersion = "20.09"; # Did you read the comment?
|
||
}
|