Updated networking for sampledb and media
This commit is contained in:
@@ -3,22 +3,13 @@
|
||||
imports = [
|
||||
../hardware/media.nix
|
||||
./headless.nix
|
||||
(import ./networking.nix {
|
||||
hostname = "sampledb-dev";
|
||||
ip_address = "192.168.100.40";
|
||||
})
|
||||
];
|
||||
|
||||
users.users.media = import ./user.nix;
|
||||
networking.hostName = "r330-media";
|
||||
|
||||
# Conigure a static IP address.
|
||||
networking.defaultGateway = "192.168.100.1";
|
||||
networking.nameservers = [ "192.168.100.1" ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 32400 ];
|
||||
networking.interfaces.enp6s18.ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.100.40";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
# Setup drivers for NVIDIA GPU
|
||||
services.xserver = {
|
||||
|
||||
23
config/networking.nix
Normal file
23
config/networking.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ ip_address, hostname }:
|
||||
{
|
||||
# Configure hostname.
|
||||
networking.hostName = hostname;
|
||||
|
||||
# Conigure a static IP address.
|
||||
networking.useDHCP = false;
|
||||
networking.useNetworkd= true;
|
||||
|
||||
networking.defaultGateway = {
|
||||
address = ip_address;
|
||||
interface = "enp6s18";
|
||||
};
|
||||
|
||||
networking.nameservers = [ "192.168.100.1" ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.interfaces.enp6s18.ipv4.addresses = [
|
||||
{
|
||||
address = ip_address;
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -3,19 +3,11 @@
|
||||
imports = [
|
||||
../hardware/sampledb.nix
|
||||
./headless.nix
|
||||
(import ./networking.nix {
|
||||
hostname = "sampledb-dev";
|
||||
ip_address = "192.168.100.42";
|
||||
})
|
||||
];
|
||||
|
||||
users.users.sampledb = import ./user.nix;
|
||||
networking.hostName = "sampledb-dev";
|
||||
|
||||
# Conigure a static IP address.
|
||||
networking.defaultGateway = "192.168.100.1";
|
||||
networking.nameservers = [ "192.168.100.1" ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 32400 ];
|
||||
networking.interfaces.ens18.ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.100.42";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user