45 lines
962 B
Nix
45 lines
962 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
# Set hostname, hostid and enable WiFi
|
|
networking = {
|
|
hostName = "panacea";
|
|
hostId = "8feb0bb8";
|
|
wireless.iwd.enable = true;
|
|
enableIPv6 = false;
|
|
};
|
|
|
|
# Enable zeroconf
|
|
services.avahi = {
|
|
enable = true;
|
|
nssmdns = true;
|
|
};
|
|
|
|
# Wireguard setup
|
|
networking.wg-quick.interfaces = {
|
|
wg0 = {
|
|
address = [ "10.8.0.2/32" ];
|
|
privateKeyFile = "/home/coolneng/.wg/keys/privatekey";
|
|
dns = [ "94.247.43.254" "78.47.243.3" ];
|
|
peers = [
|
|
# zion
|
|
{
|
|
publicKey = "GN8lqPBZYOulh6xD4GhkoEWI65HMMCpSxJSH5871YnU=";
|
|
allowedIPs = [ "0.0.0.0/0" ];
|
|
endpoint = "coolneng.duckdns.org:1194";
|
|
persistentKeepalive = 25;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
# Enable localhost SSH
|
|
services.openssh = {
|
|
enable = true;
|
|
permitRootLogin = "yes";
|
|
passwordAuthentication = false;
|
|
openFirewall = false;
|
|
startWhenNeeded = true;
|
|
};
|
|
}
|