add wireguard config to all other hosts into wheatley and auto-enable
This commit is contained in:
parent
733d98a446
commit
2a29f5587a
3 changed files with 66 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
|
@ -86,6 +87,27 @@
|
|||
# virtualisation.waydroid.enable = false;
|
||||
networking.hostName = "GLaDOS";
|
||||
|
||||
sops.secrets."wg-private-key".mode = "0440";
|
||||
sops.secrets."wg-private-key".owner = config.users.users.root.name;
|
||||
|
||||
networking.wireguard.enable = true;
|
||||
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
autostart = true;
|
||||
dns = ["1.1.1.1"];
|
||||
address = ["10.5.5.2/32"];
|
||||
privateKeyFile = config.sops.secrets."wg-private-key".path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "A02sO7uLdgflhPIRd0cbJONIaPP4z8HTxDkmX4NegFg=";
|
||||
endpoint = "84.87.146.85:5181";
|
||||
allowedIPs = ["10.47.47.0/24"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue