nixos-config/nixos/machines/pepe/lan.nix
2022-09-20 21:48:36 +02:00

27 lines
511 B
Nix

{ lib, pkgs, ... }:
let
interface = "enp0s25";
ipAddress = "10.1.0.2";
prefixLength = 24;
in
{
networking.extraHosts = ''
10.1.0.1 workout.lan
10.1.0.2 pepe.lan
'';
# todo only open needed ports
networking.firewall.trustedInterfaces = [ interface ];
networking.networkmanager.unmanaged = [ interface ];
networking.dhcpcd.denyInterfaces = [ interface ];
networking.interfaces."${interface}".ipv4.addresses = [{
address = ipAddress;
prefixLength = prefixLength;
}];
}