!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

906 Members
Declaratively manage your switching, routing, wireless, tunneling and more.271 Servers

Load older messages


SenderMessageTime
4 Apr 2026
@hexa:lossy.networkhexathat exists as a concept? TIL20:57:12
@m1cr0man:m1cr0man.comm1cr0manThe reason is that systemd ships with default network units for the nspawn container related interfaces (e.g. lib/systemd/network/80-container-vz.network for vz-* interfaces) and I want to just add some options to that instead of redefining the whole network config.20:27:16
@hexa:lossy.networkhexanetworkd is fully declarative, so overrides on nixos settings already work :P20:58:21
@m1cr0man:m1cr0man.comm1cr0manmmm actually for what I want to do, a drop-in won't even fix it as I can't change what the settings are matching against, and that's a limitation of systemd-networkd. I'll have to duplicate the configs.20:34:31
@hexa:lossy.networkhexaRedacted or Malformed Event20:58:26
@m1cr0man:m1cr0man.comm1cr0man* mmm actually for what I want to do, a drop-in won't even fix it as I can't change the [Match] section, and that's a limitation of systemd-networkd. I'll have to duplicate the configs.20:34:44
@hexa:lossy.networkhexaRedacted or Malformed Event20:58:32
5 Apr 2026
@bubylou:matrix.orgbubylou

You can use the [Match] section in NixOS. For example a LAN config I have is setup like this.

systemd.network = {
    enable = true;

    networks."10-lan" = {
      matchConfig.Name = "enp1s0";
01:17:57
@bubylou:matrix.orgbubylou *

You can use the [Match] section in NixOS. For example a LAN config I have is setup like this.

systemd.network = {
    networks."10-lan" = {
      matchConfig.Name = "enp1s0";
01:18:58
@bubylou:matrix.orgbubylou *

You can use the [Match] section in NixOS. For example a LAN config I have is setup like this. I could use regex instead of specifying the whole interface name such as enp*.

systemd.network = {
    networks."10-lan" = {
      matchConfig.Name = "enp1s0";
01:22:26
@bubylou:matrix.orgbubylou *

You can use the [Match] section in NixOS. For example a LAN config I have is setup like this. I could use regex instead of specifying the whole interface name such as matchConfig.Name = "enp*";.

systemd.network = {
    networks."10-lan" = {
      matchConfig.Name = "enp1s0";
01:23:38
@bubylou:matrix.orgbubylou *

You can use the [Match] section in NixOS. For example a LAN config I have is setup like this.

systemd.network = {
    networks."10-lan" = {
      matchConfig.Name = "enp*";
01:24:05
@m1cr0man:m1cr0man.comm1cr0man Ugh, I have spent way too long debugging why ipv6 scope IDs were not present when resolving nspawn containers from the host. It looks like nss-mymachines is broken? I would need someone else to try getent -s hosts:mymachines hosts example 02:38:37
@hexa:lossy.networkhexaempty02:44:02
@hexa:lossy.networkhexaon the one machine I have with a nixos container02:44:08
@hexa:lossy.networkhexaif that's what you were looking for02:44:16
@m1cr0man:m1cr0man.comm1cr0manYep. Damn. And is that set up with a .nspawn file? 02:46:41
@hexa:lossy.networkhexaor maybe that's only for nspawn?02:46:46
@hexa:lossy.networkhexahm02:46:49
@hexa:lossy.networkhexawhatever the current generation of nixos containers is02:47:04
@m1cr0man:m1cr0man.comm1cr0manWell if it comes up in "machinectl" and it has a ve-$container interface on the host, it should give you something based on my understanding 02:47:49
@hexa:lossy.networkhexait does come up in machinectl02:48:01
@hexa:lossy.networkhexa getent hosts <container> works fwiw 02:49:48
@m1cr0man:m1cr0man.comm1cr0manDoes your container have more than just link local ips? 02:50:14
@m1cr0man:m1cr0man.comm1cr0man
In reply to @hexa:lossy.network
getent hosts <container> works fwiw
Works for me too but on ipv6 returns no scope ID for link local addresses
02:50:43
@m1cr0man:m1cr0man.comm1cr0manI believe it is using llmnr-ipv6 instead in this case. I was able to validate that with `resolvectl query -p llmnr-ipv6 example`02:51:56
@hexa:lossy.networkhexanvm, no interface in the host namespace02:52:26
@hexa:lossy.networkhexait has a bunch of ULA ip addresses02:52:41
@hexa:lossy.networkhexaeh … 5am02:53:05
@hexa:lossy.networkhexa💤02:53:08

Show newer messages


Back to Room ListRoom Version: 6