all: switch to blocky on rico1

This commit is contained in:
Adithya 2024-10-27 18:42:14 +05:30
parent 337f17faac
commit e5fdd52581
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 8 additions and 2 deletions

View file

@ -1,7 +1,7 @@
{ lib, ... }: {
networking = {
nameservers = [
"10.10.10.10"
"10.10.10.11"
];
useDHCP = lib.mkDefault false;
};

View file

@ -16,6 +16,7 @@ in
{
nodeconfig.wireguard = {
inherit interface-name;
dns = [ "10.10.10.11" ];
endpoint = "165.232.180.97:51821";
endpoint-publickey = "NNw/iDMCTq8mpHncrecEh4UlvtINX/UUDtCJf2ToFR4=";
allowed-ips = if hostName == "skipper" then [ "10.10.10.0/24" ] else [ "10.10.10.1" "10.10.10.2" "10.10.10.3" ];

View file

@ -37,6 +37,11 @@ let cfg = config.nodeconfig; in {
default = "wg0";
description = "Name of the WireGuard interface created";
};
dns = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "list of DNS servers";
};
allowed-ips = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "10.0.0.0/24" "fd7c::/64" ];
@ -56,7 +61,7 @@ let cfg = config.nodeconfig; in {
interfaces = {
"${cfg.wireguard.interface-name}" = {
address = cfg.wireguard.node-ips;
dns = [ "10.10.10.10" ];
dns = cfg.wireguard.dns;
listenPort = cfg.wireguard.listen-port;
privateKeyFile = cfg.wireguard.pk-file;
peers = [