Add darwin hosts to wireguard
This commit is contained in:
parent
ae14f058f0
commit
7725fb6846
6 changed files with 68 additions and 1 deletions
|
|
@ -9,4 +9,20 @@
|
|||
imports = [
|
||||
../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 = [
|
||||
../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=";
|
||||
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" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue