panacea/modules/networking.nix

35 lines
713 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
{
# Set hostname, hostid and enable WiFi
networking = {
hostName = "panacea";
2020-05-08 21:53:52 +02:00
hostId = "8feb0bb8";
wireless.iwd.enable = true;
2020-07-17 12:07:57 +02:00
enableIPv6 = false;
};
# Enable zeroconf
services.avahi = {
enable = true;
nssmdns = true;
};
# Wireguard setup
networking.wg-quick.interfaces = {
home = {
2020-06-10 01:19:20 +02:00
address = [ "10.8.0.2/32" ];
2021-08-09 02:10:51 +02:00
privateKeyFile = config.age.secrets.wireguard.path;
2020-12-01 11:05:38 +01:00
dns = [ "10.8.0.1" ];
peers = [
# zion
{
publicKey = "GN8lqPBZYOulh6xD4GhkoEWI65HMMCpSxJSH5871YnU=";
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "coolneng.duckdns.org:1194";
}
];
};
};
}