Migrate to systemd-networkd
This commit is contained in:
parent
ea8e8a25e9
commit
fbceccefe6
|
@ -9,26 +9,34 @@
|
|||
enableIPv6 = false;
|
||||
};
|
||||
|
||||
# Enable systemd-networkd
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
interfaces = {
|
||||
enp0s31f6.useDHCP = true;
|
||||
wlan0.useDHCP = true;
|
||||
};
|
||||
useNetworkd = true;
|
||||
dhcpcd.enable = false;
|
||||
};
|
||||
systemd.services."systemd-networkd-wait-online".enable = false;
|
||||
|
||||
# Static IP for home network
|
||||
systemd.network.networks."24-home" = {
|
||||
name = "wlan0";
|
||||
matchConfig = {
|
||||
Name = "wlan0";
|
||||
SSID = "WiFi-5.0-CE42";
|
||||
};
|
||||
address = [ "192.168.1.131/24" ];
|
||||
gateway = [ "192.168.1.1" ];
|
||||
dns = [ "192.168.1.2" ];
|
||||
networkConfig.DNSSEC = "no";
|
||||
};
|
||||
|
||||
# Enable zeroconf
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
};
|
||||
|
||||
# Wireguard setup
|
||||
networking.wg-quick.interfaces = {
|
||||
home = {
|
||||
address = [ "10.8.0.2/32" ];
|
||||
privateKeyFile = config.age.secrets.wireguard.path;
|
||||
dns = [ "10.8.0.1" ];
|
||||
peers = [
|
||||
# zion
|
||||
{
|
||||
publicKey = "GN8lqPBZYOulh6xD4GhkoEWI65HMMCpSxJSH5871YnU=";
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
endpoint = "coolneng.duckdns.org:1194";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue