flake/hosts/wg-gateway/default.nix

38 lines
816 B
Nix

{
config,
lib,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
lyn.kernel.latest.enable = true;
lyn.profiles.base.enable = true;
lyn.profiles.secureboot.enable = true;
lyn.users.lyn.enable = true;
# network
lyn.services.wgautomesh.enable = true;
networking.useDHCP = false;
networking.hostName = "wg-gateway"; # Define your hostname.
systemd.network.enable = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "enp1s0";
networkConfig.DHCP = "ipv4";
address = [
"2a01:4f8:1c1b:d2db::/64"
];
routes = [
{routeConfig.Gateway = "fe80::1";}
];
};
system.stateVersion = "24.05";
}