updated flake for rc wgautomesh version

This commit is contained in:
Lyn 2025-01-15 18:55:00 +01:00
parent 60a62f0288
commit 4853aeec19
4 changed files with 20 additions and 21 deletions

View file

@ -172,11 +172,11 @@
"spectrum": "spectrum"
},
"locked": {
"lastModified": 1736637237,
"narHash": "sha256-kZELEfQDEbCljZUpmIw0G0tNNdcJlnLvc6bwKQ++Okw=",
"lastModified": 1736905611,
"narHash": "sha256-eW6SfZRaOnOybBzhvEzu3iRL8IhwE0ETxUpnkErlqkE=",
"owner": "astro",
"repo": "microvm.nix",
"rev": "6f7e4a7bfcdce1c703f9cb89ae9d634167b720b8",
"rev": "a18d7ba1bb7fd4841191044ca7a7f895ef2adf3b",
"type": "github"
},
"original": {
@ -235,11 +235,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1736754065,
"narHash": "sha256-hcETjfECLklW1ND8svDvN0Nw6H/1qtuoz3rbFNQ1Lrk=",
"lastModified": 1736867362,
"narHash": "sha256-i/UJ5I7HoqmFMwZEH6vAvBxOrjjOJNU739lnZnhUln8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "67e9c880898889470f153157a96b595e758167fc",
"rev": "9c6b49aeac36e2ed73a8c472f1546f6d9cf1addc",
"type": "github"
},
"original": {

View file

@ -74,18 +74,23 @@ in {
default = true;
description = "Enable discovery of peers on the same LAN using UDP broadcast.";
};
upnp_open_ports = mkOption {
type = types.bool;
default = false;
description = "Enable UPnP IGD port forwarding to interfaces of this wgautomesh instance.";
};
interfaces = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {
type = types.str;
};
upnp_forward_external_port = mkOption {
upnp_forward_ext_port_v4 = mkOption {
type = types.nullOr types.port;
default = null;
description = ''
Public port number to try to redirect to this machine's Wireguard
daemon using UPnP IGD. For IPv6 only interfaces the value is discarded, to enable please set it to any valid port number.
daemon using UPnP IGD. Only used if the interface has IPv4 peers.
'';
};
};

View file

@ -95,16 +95,13 @@ in {
then [
{
name = "wg0";
upnp_forward_external_port = config.networking.wireguard.interfaces.wg0.listenPort;
}
{
name = "wg1";
upnp_forward_external_port = config.networking.wireguard.interfaces.wg1.listenPort;
upnp_forward_ext_port_v4 = config.networking.wireguard.interfaces.wg0.listenPort;
}
]
else [];
peers = buildPeerlist "IPv6" meshnetwork.hosts ++ buildPeerlist "IPv4" meshnetwork.hosts;
lan_discovery = cfg.enable_lan_discovery;
upnp_open_ports = cfg.enable_upnp_portforward;
};
gossipSecretFile = gossip_secret_path;
};

View file

@ -8,15 +8,12 @@ inputs: final: prev: {
};
wgam-nightly = prev.wgautomesh.override {rustPlatform = platform;};
wgam-lyn = wgam-nightly.overrideAttrs (old: rec {
src = prev.fetchFromGitHub {
owner = "lynatic1337";
repo = "wgautomesh";
rev = "53b7a6b6edc144fc0d9679ed5c756530f9883374";
hash = "sha256-3pUQbNcx/EMhsiqZ74l8Y99VrdlsLgOgcYuHb4hKOiI=";
src = builtins.fetchGit {
url = "https://git.deuxfleurs.fr/lynatic/wgautomesh.git";
rev = "9482910911d6cccce92d6990acbee7a5df3d879d";
};
cargoDeps = platform.fetchCargoTarball {
inherit src;
hash = "sha256-lIRrH6rH0G1CSxOq59bcal5xHTXyjq6RHgoXlyI/Hj4=";
cargoDeps = platform.importCargoLock {
lockFile = src + "/Cargo.lock";
};
});
in