Skip to content

Commit

Permalink
feat: add wireguard configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Dec 29, 2023
1 parent 98f2afe commit 74326d5
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 12 deletions.
15 changes: 8 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions hosts/dekomori/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
type = "server";
archisteamfarm.enable = true;
boot.mode = "legacy";
wireguard.enable = true;
};
}
6 changes: 3 additions & 3 deletions hosts/dekomori/secrets.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"data": "ENC[AES256_GCM,data:NwxCohtXJ3TqGETzAJ6JhugeM6/lAD0E6i4yBg5Y7elvkfbkcQA7qie3wHIDAZdWUrbaZoexMnZKPFzCncsdF5K15K0p986N8R0gMllBHxzQO8/smIGf2rY8LLAwR5zu67fERVFKBb82GQTmxLdluE55/Mdocz3aTZf9UvMzFjEb5PHmCrJPWDyWadLy/qJ8rGKzW25TYVmzkdNVH7OomEW0Ty2YjrXezfsIXtNLz9TMeL2fT/SCOULbn9h9PGvCVXgRD4mvaI0yPeXK4lmxAfOrGbpN/k+jcbMg40Xbr0L5J1dV9FwugnIIMRNLXA8RoDxh26ij2ICknN6i879Gmyc2FOVGCRNl2c9r8feRxFue1Hhx5RVMjJglHNryvFCETizxvTklb8BhhDYruKMKsMNNlvKiMmqC3uxFXk9T780HcIPI/dCx86KlkarOdvqTcNHn+MSOr4l6Grc7bPAkUoYdT84Q8Zp2iW05sXO+KkaswiEJAErUEpjpZzmDk9Ffplr1FPqINBJrRiYCNrFbkEVQhHmv6sFWr966TrhL7ZRmftCiw34zRT0wOv3uJeg8,iv:yWShiBSmUqGIn0K07KlW8qbAQBmx3wP4Ucomc1Hij7Y=,tag:FepmSSE9pq3FBvxnRs6Y7Q==,type:str]",
"data": "ENC[AES256_GCM,data:xvJkQts8M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ED FILE-----\n"
}
],
"lastmodified": "2023-12-28T19:32:46Z",
"mac": "ENC[AES256_GCM,data:56GYFdOurMjsjALZTLDYPsUTpwptW7Gsv/jq0T0d2D34DkHWSoTTgfKMhtbBaFldyjRV8RmLFiGfS+j4swi4jxCghS24He194Cvrj+dikjLvpRc+JBgdYQUl/mn45mHVvrzkFrM9XzVF7ebFqJjmN/SSuf++VSLQqnBDnQbwrHg=,iv:5cdPW+tU+6of8Ix9rC/ry7cS4C6sBz0qaEemJVNLGEs=,tag:6tCaHlD8Vx7roHOg52AAyQ==,type:str]",
"lastmodified": "2023-12-29T07:50:33Z",
"mac": "ENC[AES256_GCM,data:TLnhEXtzaN9hQ9sj8bI/z1KXEqUvXaXPQ6CE2SMC0uD+lXA5GXghtjD7s4u+G92/qBxHvyPqO+AZS91orrq1dYkZope6rIRIGPUp4OIougBgC91Nzo9kI0bE5+UPI6dEUheE/2FJzsVE8kaf1FOiMKQXTjcz5oxF+n8a/e9wnjA=,iv:pGN57/UDV+YptpAiBSd/f8FW4s0KZpERJg8P1F2L7ts=,tag:ZJnfnG7FylBbdpwn1hrtKg==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.7.3"
Expand Down
26 changes: 25 additions & 1 deletion hosts/dekomori/shared.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
{...}: {
{secrets, ...}: {
yunfachi = {
wireguard = {
server = {
ip = secrets.yunfachi.wireguard.server.ip;
port = secrets.yunfachi.wireguard.server.port;
interface = "ens3";
tunnel = "10.0.0.1";
publicKey = secrets.yunfachi.wireguard.server.publicKey;
};

clients = {
"a52" = {
ip = "10.0.0.101";
publicKey = secrets.yunfachi.wireguard.clients."a52".publicKey;
};
"p11" = {
ip = "10.0.0.102";
publicKey = secrets.yunfachi.wireguard.clients."p11".publicKey;
};
"t12" = {
ip = "10.0.0.103";
publicKey = secrets.yunfachi.wireguard.clients."t12".publicKey;
};
};
};
};
}
10 changes: 9 additions & 1 deletion hosts/mitama/shared.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{...}: {
{
host,
secrets,
...
}: {
yunfachi = {
wireguard.clients."${host}" = {
ip = "10.0.0.2";
publicKey = secrets.yunfachi.wireguard.clients."${host}".publicKey;
};
};
}

0 comments on commit 74326d5

Please sign in to comment.