Archived
Switch LXC targets from NetworkManager to systemd-networkd
boot.isContainer disables services.udev, which NetworkManager depends on to enumerate devices — this left NM unable to reliably manage the container veth, breaking DHCP-hostname registration in Pi-hole. It also defaulted networking.useHostResolvConf to true, which assumes a systemd-nspawn-style resolv.conf bind-mount that real Proxmox LXC doesn't provide (nixpkgs' own proxmox-lxc.nix module forces this false for the same reason). Also guard the networkmanager extraGroups membership in the minimal/gui build-types, since that group only exists when NM is enabled. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
This commit is contained in:
@@ -38,7 +38,10 @@
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
users.users.nixos.extraGroups = [ "networkmanager" ];
|
||||
# The networkmanager group only exists when NM is actually enabled — the
|
||||
# lxc platform module force-disables it, so don't add the user to a group
|
||||
# that won't exist there.
|
||||
users.users.nixos.extraGroups = lib.mkIf config.networking.networkmanager.enable [ "networkmanager" ];
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
users.users.nixos.extraGroups = [ "networkmanager" ];
|
||||
# The networkmanager group only exists when NM is actually enabled — the
|
||||
# lxc platform module force-disables it, so don't add the user to a group
|
||||
# that won't exist there.
|
||||
users.users.nixos.extraGroups = lib.mkIf config.networking.networkmanager.enable [ "networkmanager" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
inetutils
|
||||
|
||||
Reference in New Issue
Block a user