Add darwin hosts to wireguard
This commit is contained in:
parent
ae14f058f0
commit
7725fb6846
6 changed files with 68 additions and 1 deletions
12
config/wireguard/imac.conf
Normal file
12
config/wireguard/imac.conf
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Interface]
|
||||||
|
# iMac WireGuard Configuration
|
||||||
|
PrivateKey = AGcWC6Y8e3/FRIGHrg0uwHrILbS7x4hBIDpozZGIf2U=
|
||||||
|
Address = 10.2.2.40/24
|
||||||
|
DNS = 1.1.1.1, 8.8.8.8
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
# VPS Server
|
||||||
|
PublicKey = 46QHjSzAas5g9Hll1SCEu9tbR5owCxXAy6wGOUoPwUM=
|
||||||
|
Endpoint = 91.98.84.215:51820
|
||||||
|
AllowedIPs = 10.2.2.0/24
|
||||||
|
PersistentKeepalive = 25
|
||||||
12
config/wireguard/mba.conf
Normal file
12
config/wireguard/mba.conf
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Interface]
|
||||||
|
# MacBook Air WireGuard Configuration
|
||||||
|
PrivateKey = eOmRh2Mrb9+xmbFtHtuOxlRM09ZLKOVWeoEQJk07bVo=
|
||||||
|
Address = 10.2.2.41/24
|
||||||
|
DNS = 1.1.1.1, 8.8.8.8
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
# VPS Server
|
||||||
|
PublicKey = 46QHjSzAas5g9Hll1SCEu9tbR5owCxXAy6wGOUoPwUM=
|
||||||
|
Endpoint = 91.98.84.215:51820
|
||||||
|
AllowedIPs = 10.2.2.0/24
|
||||||
|
PersistentKeepalive = 25
|
||||||
|
|
@ -9,4 +9,20 @@
|
||||||
imports = [
|
imports = [
|
||||||
../system-default.nix
|
../system-default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# WireGuard LaunchAgent for auto-start
|
||||||
|
launchd.user.agents.wireguard = {
|
||||||
|
serviceConfig = {
|
||||||
|
ProgramArguments = [
|
||||||
|
"/opt/homebrew/bin/wg-quick"
|
||||||
|
"up"
|
||||||
|
"/Users/yanlin/.config/nix/config/wireguard/imac.conf"
|
||||||
|
];
|
||||||
|
RunAtLoad = true;
|
||||||
|
KeepAlive = false;
|
||||||
|
Label = "com.wireguard.imac";
|
||||||
|
StandardErrorPath = "/tmp/wireguard.err";
|
||||||
|
StandardOutPath = "/tmp/wireguard.out";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,20 @@
|
||||||
imports = [
|
imports = [
|
||||||
../system-default.nix
|
../system-default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# WireGuard LaunchAgent for auto-start
|
||||||
|
launchd.user.agents.wireguard = {
|
||||||
|
serviceConfig = {
|
||||||
|
ProgramArguments = [
|
||||||
|
"/opt/homebrew/bin/wg-quick"
|
||||||
|
"up"
|
||||||
|
"/Users/yanlin/.config/nix/config/wireguard/mba.conf"
|
||||||
|
];
|
||||||
|
RunAtLoad = true;
|
||||||
|
KeepAlive = false;
|
||||||
|
Label = "com.wireguard.mba";
|
||||||
|
StandardErrorPath = "/tmp/wireguard.err";
|
||||||
|
StandardOutPath = "/tmp/wireguard.out";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,16 @@
|
||||||
publicKey = "f/+Jyz4CpD5uyaZox77IuD9mI/KU9QOiK6tLMcbVGTE=";
|
publicKey = "f/+Jyz4CpD5uyaZox77IuD9mI/KU9QOiK6tLMcbVGTE=";
|
||||||
allowedIPs = [ "10.2.2.31/32" ];
|
allowedIPs = [ "10.2.2.31/32" ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "imac";
|
||||||
|
publicKey = "MVpIxA7HOjTCAsyI/IXK4lo0B2OM9BCHzUelUyAqT20=";
|
||||||
|
allowedIPs = [ "10.2.2.40/32" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "mba";
|
||||||
|
publicKey = "NeaCT4v6eUzHkRhm5YcKnB4W8KXBCZNedoBlLM5zMQQ=";
|
||||||
|
allowedIPs = [ "10.2.2.41/32" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
};
|
};
|
||||||
brews = [
|
brews = [
|
||||||
# Command-line tools go here
|
# Command-line tools go here
|
||||||
# Example: "wget"
|
"wireguard-go"
|
||||||
|
"wireguard-tools"
|
||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
# GUI applications - manually installed apps now managed by Homebrew
|
# GUI applications - manually installed apps now managed by Homebrew
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue