CHANGES: NetworkManager to systemd-networkd
This commit is contained in:
parent
bb18183277
commit
fd9f5e202c
6 changed files with 41 additions and 20 deletions
|
|
@ -20,7 +20,6 @@
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "terre-neuvas"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
|
|
@ -33,7 +32,7 @@
|
|||
|
||||
users.users.lomig = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["networkmanager" "lp" "wheel" "docker" ];
|
||||
extraGroups = [ "lp" "wheel" "docker" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
|
|
@ -50,8 +49,40 @@
|
|||
hugo
|
||||
];
|
||||
networking = {
|
||||
firewall.allowedTCPPorts = [ 80 5900 5901 5902 ];
|
||||
useNetworkd = true ;
|
||||
firewall.allowedTCPPorts = [ 22 80 5900 5901 5902 ];
|
||||
interfaces.eno1.useDHCP = false ;
|
||||
interfaces.br0 = {
|
||||
useDHCP = false ;
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.0.3";
|
||||
prefixLength = 24 ;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = {
|
||||
interface = "br0" ;
|
||||
address = "192.168.0.254" ;
|
||||
};
|
||||
nameservers = [ "192.168.0.254" "1.1.1.1" ];
|
||||
bridges.br0.interfaces = [ "eno1" ];
|
||||
};
|
||||
systemd.network = {
|
||||
enable = true ;
|
||||
netdevs."br0" = {
|
||||
netdevConfig = {
|
||||
Name = "br0";
|
||||
Kind = "bridge";
|
||||
};
|
||||
};
|
||||
networks."br0" = {
|
||||
matchConfig.Name = "br0" ;
|
||||
};
|
||||
networks."eno1" = {
|
||||
matchConfig.Name = "eno1";
|
||||
networkConfig.Bridge = "br0";
|
||||
};
|
||||
};
|
||||
system.stateVersion = "25.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.kernelModules = lib.mkAfter [ "kvm-intel" "tun" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue