Added open_ports argument to networking file

This commit is contained in:
Random936 2024-11-03 20:48:50 -08:00
parent 627dd4c412
commit 45dc1cfe52
3 changed files with 5 additions and 3 deletions

View File

@ -4,8 +4,9 @@
../hardware/media.nix
./headless.nix
(import ./networking.nix {
hostname = "sampledb-dev";
hostname = "r330-media";
ip_address = "192.168.100.40";
open_ports = [ 80 443 32400 ];
})
];

View File

@ -1,4 +1,4 @@
{ ip_address, hostname }:
{ ip_address, hostname, open_ports }:
{
# Configure hostname.
networking.hostName = hostname;
@ -16,7 +16,7 @@
};
networking.nameservers = [ "192.168.100.1" ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedTCPPorts = open_ports;
networking.interfaces.enp6s18.ipv4.addresses = [
{
address = ip_address;

View File

@ -6,6 +6,7 @@
(import ./networking.nix {
hostname = "sampledb-dev";
ip_address = "192.168.100.42";
open_ports = [ 80 443 ];
})
];