EXPERIMENT: make wireguard config customizable
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
./users/shatteredmint.nix
|
./users/shatteredmint.nix
|
||||||
./network-shares.nix
|
./network-shares.nix
|
||||||
|
|
||||||
./software/wireguard-client.nix 10
|
(import ./software/wireguard-client.nix {ip = 10;})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nix-nas = lib.nixosSystem {
|
nix-nas = lib.nixosSystem {
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
# this configuration is for a device on the home network
|
# this configuration is for a device on the home network
|
||||||
# it exposes the entire home network to outside peers
|
# it exposes the entire home network to outside peers
|
||||||
|
|
||||||
{ip, config, pkgs, ...}@inputs: {
|
{ip}: {
|
||||||
networking = {
|
networking = {
|
||||||
firewall.allowedUDPPorts = [56878];
|
firewall.allowedUDPPorts = [56878];
|
||||||
wireguard = {
|
wireguard = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interfaces.wg0 = {
|
interfaces.wg0 = {
|
||||||
ips = [ ("192.168.87." ++ ip ++ "/32")];
|
ips = [ ("192.168.87." + builtins.toString(ip) + "/32")];
|
||||||
listenPort = 56878;
|
listenPort = 56878;
|
||||||
privateKeyFile = "/root/wg.keys";
|
privateKeyFile = "/root/wg.keys";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user