IfState: Difference between revisions

m dhcpv4: replace custom script with packaged udhcpc/default.script
m Change link to current site wiki
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:


=== Examples ===
=== Examples ===
You can find several examples on the [https://ifstate.net/2.0/examples/ IfState website]. Some include NixOS configuration instructions, while the more complex examples are covered in detail here.
You can find several examples on the [https://ifstate.net/2.2/examples/ IfState website]. Some include NixOS configuration instructions, while the more complex examples are covered in detail here.


==== Network Namespaces (netns) ====
==== Network Namespaces (netns) ====
Line 15: Line 15:
   systemd.services."<name>".serviceConfig.NetworkNamespacePath = "/var/run/netns/<netnsName>";
   systemd.services."<name>".serviceConfig.NetworkNamespacePath = "/var/run/netns/<netnsName>";
}
}
</syntaxhighlight>When using [https://nixos.wiki/wiki/NixOS_Containers nixos-containers], network namespaces allow you to configure the network outside the container. This separation simplifies management and ensures the container’s network setup is independent of its internal configuration.<syntaxhighlight lang="nixos">
</syntaxhighlight>When using [[NixOS Containers|nixos-containers]], network namespaces allow you to configure the network outside the container. This separation simplifies management and ensures the container’s network setup is independent of its internal configuration.<syntaxhighlight lang="nixos">
{
{
   containers."<name>".networkNamespace = "/var/run/netns/<netnsName>";
   containers."<name>".networkNamespace = "/var/run/netns/<netnsName>";