fix networking config refering to wiki

This commit is contained in:
ulic-youthlic 2025-04-12 01:49:32 +08:00
parent 5b684020c1
commit 05beef2e59
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 18 additions and 5 deletions

View file

@ -25,9 +25,15 @@
wireless.iwd = { wireless.iwd = {
enable = true; enable = true;
settings = { settings = {
IPv6 = {
Enabled = true;
};
General = { General = {
EnableNetworkConfiguration = true; EnableNetworkConfiguration = true;
}; };
Settings = {
AutoConnect = true;
};
Network = { Network = {
EnableIPv6 = true; EnableIPv6 = true;
NameResolvingService = "systemd"; NameResolvingService = "systemd";

View file

@ -4,22 +4,23 @@
enable = true; enable = true;
wait-online.enable = false; wait-online.enable = false;
networks = { networks = {
"eno2" = { "10-eno2" = {
dns = [ dns = [
"192.168.31.1" "192.168.31.1"
]; ];
address = [ address = [
"192.168.31.25/24" "192.168.31.25/24"
]; ];
gateway = [ # gateway = [
"192.168.31.1" # "192.168.31.1"
]; # ];
routes = [ routes = [
{ {
Gateway = "192.168.31.1"; Gateway = "192.168.31.1";
} }
]; ];
matchConfig.Name = "eno2"; matchConfig.Name = "eno2";
linkConfig.RequiredForOnline = "routable";
# networkConfig = { # networkConfig = {
# DHCP = "yes"; # DHCP = "yes";
# IPv6AcceptRA = true; # IPv6AcceptRA = true;
@ -30,7 +31,7 @@
networking = { networking = {
networkmanager.enable = false; networkmanager.enable = false;
useNetworkd = true; # useNetworkd = true;
useDHCP = false; useDHCP = false;
nftables = { nftables = {
enable = true; enable = true;
@ -39,9 +40,15 @@
wireless.iwd = { wireless.iwd = {
enable = true; enable = true;
settings = { settings = {
IPv6 = {
Enabled = true;
};
General = { General = {
EnableNetworkConfiguration = true; EnableNetworkConfiguration = true;
}; };
Settings = {
AutoConnect = true;
};
Network = { Network = {
EnableIPv6 = true; EnableIPv6 = true;
NameResolvingService = "systemd"; NameResolvingService = "systemd";