Revert "remove wireguard stuff"
This reverts commit9b8ec24c63
. This reverts commitec04addf62
.
This commit is contained in:
parent
cf79a1c98d
commit
c034a10aef
6 changed files with 49 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
|
imports = [./wireguard.nix];
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "Rico2";
|
hostName = "Rico2";
|
||||||
useDHCP = lib.mkDefault false;
|
useDHCP = lib.mkDefault false;
|
||||||
|
|
23
hosts/rico2/wireguard.nix
Normal file
23
hosts/rico2/wireguard.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
secrets,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (secrets.wireguard_config) peers;
|
||||||
|
in {
|
||||||
|
networking.wireguard = {
|
||||||
|
enable = true;
|
||||||
|
interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
ips = peers."${config.networking.hostName}".allowedIPs;
|
||||||
|
privateKeyFile = "/etc/wireguard/private.key";
|
||||||
|
generatePrivateKeyFile = true;
|
||||||
|
listenPort = 51820;
|
||||||
|
peers = with peers; [
|
||||||
|
Proxy
|
||||||
|
Skipper
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
|
imports = [./wireguard.nix];
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "Skipper";
|
hostName = "Skipper";
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
|
|
|
@ -5,6 +5,7 @@ _: {
|
||||||
"/etc/secureboot"
|
"/etc/secureboot"
|
||||||
"/etc/ssh/keys"
|
"/etc/ssh/keys"
|
||||||
"/etc/systemd/nspawn"
|
"/etc/systemd/nspawn"
|
||||||
|
"/etc/wireguard"
|
||||||
"/root/.cache/nix"
|
"/root/.cache/nix"
|
||||||
"/var/cache/apparmor"
|
"/var/cache/apparmor"
|
||||||
"/var/cache/fwupd"
|
"/var/cache/fwupd"
|
||||||
|
|
23
hosts/skipper/wireguard.nix
Normal file
23
hosts/skipper/wireguard.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
secrets,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (secrets.wireguard_config) peers;
|
||||||
|
in {
|
||||||
|
networking.wireguard = {
|
||||||
|
enable = true;
|
||||||
|
interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
ips = peers."${config.networking.hostName}".allowedIPs;
|
||||||
|
privateKeyFile = "/etc/wireguard/private.key";
|
||||||
|
generatePrivateKeyFile = true;
|
||||||
|
listenPort = 51820;
|
||||||
|
peers = with peers; [
|
||||||
|
Proxy
|
||||||
|
Rico2
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
BIN
secrets.nix
BIN
secrets.nix
Binary file not shown.
Loading…
Reference in a new issue