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