Compare commits
3 Commits
77fa789756
...
22974fe706
Author | SHA1 | Date |
---|---|---|
Felix Albrigtsen | 22974fe706 | |
Felix Albrigtsen | 0c74f51c2f | |
Felix Albrigtsen | a88f70821a |
|
@ -20,10 +20,20 @@
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
networking.hostName = "ildkule"; # Define your hostname.
|
networking.hostName = "ildkule"; # Define your hostname.
|
||||||
systemd.network.networks."30-all" = values.defaultNetworkConfig // {
|
|
||||||
matchConfig.Name = "en*";
|
# Main connection, using the global/floatig IP, for communications with the world
|
||||||
DHCP = "yes";
|
systemd.network.networks."30-ntnu-global" = values.openstackGlobalNetworkConfig // {
|
||||||
gateway = [ ];
|
matchConfig.Name = "ens4";
|
||||||
|
|
||||||
|
# Add the global address in addition to the local address learned from DHCP
|
||||||
|
addresses = [
|
||||||
|
{ addressConfig.Address = "${values.hosts.ildkule.ipv4_global}/32"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Secondary connection only for use within the university network
|
||||||
|
systemd.network.networks."40-ntnu-internal" = values.openstackLocalNetworkConfig // {
|
||||||
|
matchConfig.Name = "ens3";
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile
|
# List packages installed in system profile
|
||||||
|
|
23
values.nix
23
values.nix
|
@ -73,4 +73,27 @@ in rec {
|
||||||
DHCP = "no";
|
DHCP = "no";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
openstackGlobalNetworkConfig = {
|
||||||
|
networkConfig.IPv6AcceptRA = "no";
|
||||||
|
dns = [ "129.241.0.200" "129.241.0.201" ];
|
||||||
|
domains = [ "pvv.ntnu.no" "pvv.org" ];
|
||||||
|
DHCP = "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
openstackLocalNetworkConfig = {
|
||||||
|
networkConfig.IPv6AcceptRA = "no";
|
||||||
|
dns = [ "129.241.0.200" "129.241.0.201" ];
|
||||||
|
domains = [ "pvv.ntnu.no" "pvv.org" ];
|
||||||
|
DHCP = "yes";
|
||||||
|
routes = [
|
||||||
|
{
|
||||||
|
routeConfig.Destination = "10.0.0.0/8";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
linkConfig.RequiredForOnline = "no";
|
||||||
|
dhcpV4Config = {
|
||||||
|
# Only use this network for link-local networking, no global/default routes
|
||||||
|
UseRoutes = "no";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue