!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

867 Members
Declaratively manage your switching, routing, wireless, tunneling and more. | Don't rely on `networking.*` use systemd-networkd and NetworkManager instead. | Set `SYSTEMD_LOG_LEVEL=debug` to debug networking issues with networkd | No bad nft puns, please. | Room recommendations: #sysops:nixos.org248 Servers

Load older messages


SenderMessageTime
7 Oct 2025
@x10an14:matrix.orgx10an14 Yup, adding the Nebula Interface's name to networking.firewall.trustedInterfaces made it so that the dig command now works from the lighthouse to the non-lighthouse node 13:45:11
8 Oct 2025
@x10an14:matrix.orgx10an14Is this maybe a better channel? Should `nixos-rebuild switch && { nmcli dev show | grep DNS; }` not show the added `networking.networkmanager.insertNameserver` given in this git commit? ```diff diff --git a/nixos/x10an14_at_lighthouse/config.nix b/nixos/x10an14_at_lighthouse/config.nix index f19300c..3f87bc8 100644 --- a/nixos/x10an14_at_lighthouse/config.nix +++ b/nixos/x10an14_at_lighthouse/config.nix @@ -1,17 +1,32 @@ -toplevel: { +{ lib, ... }@toplevel: +{ _file = ./config.nix; - flake.modules.nixos.lighthouse = { - imports = [ - (toplevel.config.flake.modules.nixos.non-work or { }) - toplevel.inputs.nixos-facter.nixosModules.facter + flake.modules.nixos.lighthouse = + nixos: + let + nebulaCfg = nixos.config.services.nebula.networks.x10an14; + in + { + imports = [ + (toplevel.config.flake.modules.nixos.non-work or { }) + toplevel.inputs.nixos-facter.nixosModules.facter + ]; + } + // lib.mkMerge [ + { + boot.loader.grub = { + efiSupport = true; + efiInstallAsRemovable = true; + }; + facter.reportPath = ./facter.json; + system.stateVersion = "25.11"; + system.autoUpgrade.enable = true; + } + (lib.mkIf nebulaCfg.enable { + networking.networkmanager = { + enable = true; + insertNameservers = [ "192.168.117.8" ]; + }; + }) ]; - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; - }; - networking.useDHCP = true; - facter.reportPath = ./facter.json; - system.stateVersion = "25.11"; - system.autoUpgrade.enable = true; - }; } ```07:48:50
@x10an14:matrix.orgx10an14* Is this maybe a better channel? Should `nixos-rebuild switch && { nmcli dev show | grep DNS; }` not show the added `networking.networkmanager.insertNameserver` given in this git commit? ```diff diff --git a/nixos/x10an14_at_lighthouse/config.nix b/nixos/x10an14_at_lighthouse/config.nix index f19300c..3f87bc8 100644 --- a/nixos/x10an14_at_lighthouse/config.nix +++ b/nixos/x10an14_at_lighthouse/config.nix @@ -1,17 +1,32 @@ -toplevel: { +{ lib, ... }@toplevel: +{ _file = ./config.nix; - flake.modules.nixos.lighthouse = { - imports = [ - (toplevel.config.flake.modules.nixos.non-work or { }) - toplevel.inputs.nixos-facter.nixosModules.facter + flake.modules.nixos.lighthouse = + nixos: + let + nebulaCfg = nixos.config.services.nebula.networks.x10an14; + in + { + imports = [ + (toplevel.config.flake.modules.nixos.non-work or { }) + toplevel.inputs.nixos-facter.nixosModules.facter + ]; + } + // lib.mkMerge [ + { + boot.loader.grub = { + efiSupport = true; + efiInstallAsRemovable = true; + }; + facter.reportPath = ./facter.json; + system.stateVersion = "25.11"; + system.autoUpgrade.enable = true; + } + (lib.mkIf nebulaCfg.enable { + networking.networkmanager = { + enable = true; + insertNameservers = [ "192.168.117.8" ]; + }; + }) ]; - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; - }; - networking.useDHCP = true; - facter.reportPath = ./facter.json; - system.stateVersion = "25.11"; - system.autoUpgrade.enable = true; - }; } ```07:49:21
@k900:0upti.meK900No07:49:46
@k900:0upti.meK900It's a horrible hack and you should not use it07:49:50
@k900:0upti.meK900Just use resolved07:49:58
@elvishjerricco:matrix.orgElvishJerricco x10an14: { imports = ...; } // lib.mkMerge [ ... ] seems busted 07:55:46
@elvishjerricco:matrix.orgElvishJerricco should just be { imports = ...; config = lib.mkMerge [ ... ]; } 07:56:16
@x10an14:matrix.orgx10an14
In reply to @elvishjerricco:matrix.org
x10an14: { imports = ...; } // lib.mkMerge [ ... ] seems busted
Nix evaluates it without issue, but sure, I think that's a reasonable suggestion, thanks!
08:01:10
@elvishjerricco:matrix.orgElvishJerricco frankly I'm not sure what it evaluates too, once through the module system 08:01:31
@elvishjerricco:matrix.orgElvishJerriccoit might just be dropping stuff, I dunno08:01:37
@elvishjerricco:matrix.orgElvishJerricco actually, when I try that I get: error: Expected a module, but found a value of type "merge".) 08:03:27
@elvishjerricco:matrix.orgElvishJerricco * actually, when I try that I get: error: Expected a module, but found a value of type "merge". 08:03:30
@x10an14:matrix.orgx10an14
In reply to @k900:0upti.me
Just use resolved

Hmm, that requires more research... Got any hints/directions to suggest?

This diff spawned out of using "stock" nixos 25.11 + facter on a hetzner box, and wanting to add a custom DNS as top priority, with DHCP dns entries maintained after the custom one

08:04:44
@k900:0upti.meK900Why are you using networkmanager on a hetzner box08:05:00
@k900:0upti.meK900In the first place08:05:06
@x10an14:matrix.orgx10an14
In reply to @elvishjerricco:matrix.org
actually, when I try that I get: error: Expected a module, but found a value of type "merge".
Maybe flake-parts modules does some magic for me?
08:05:18
@elvishjerricco:matrix.orgElvishJerriccothat would be quite shocking08:05:32
@elvishjerricco:matrix.orgElvishJerriccoit should not be fundamentally changing how the module system works08:05:42
@k900:0upti.meK900Oh wait08:06:03
@elvishjerricco:matrix.orgElvishJerriccoI'm more worried that you're not actually importing this module and that's why it isn't throwing an error or doing what you expected it to do08:06:03
@k900:0upti.meK900You're NOT using networkmanager08:06:06
@k900:0upti.meK900You're using scripted networking08:06:12
@k900:0upti.meK900And trying to apply networkmanager options to it08:06:16
@k900:0upti.meK900I assume it's this? ┃ │ ┌─ ⏸ unit-dbus-broker.service08:06:32
@k900:0upti.meK900* I assume it's this? https://github.com/slackhq/nebula08:06:38
@x10an14:matrix.orgx10an14
In reply to @k900:0upti.me
Why are you using networkmanager on a hetzner box
Best suggestion I found after 2h of web search and 4+ years of nixos usage searching for "add dns server to nixos without removing DHCP"
08:07:06
@k900:0upti.meK900 services.resolved.enable = true is what you want I'm pretty sure 08:07:22
@k900:0upti.meK900And then hopefully it does the right thing08:07:27
@k900:0upti.meK900And if it doesn't, it's fundamentally broken08:07:43

Show newer messages


Back to Room ListRoom Version: 6