mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-29 18:08:29 +02:00
configured backups
This commit is contained in:
parent
60e1f3c3d0
commit
b48fa4e383
25 changed files with 217 additions and 92 deletions
|
@ -1,5 +1,13 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
sops.secrets = {
|
||||
"wireguard/dorm/private" = {
|
||||
owner = config.users.users.systemd-network.name;
|
||||
};
|
||||
"wireguard/dorm/preshared" = {
|
||||
owner = config.users.users.systemd-network.name;
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
hostName = "falkenstein-1";
|
||||
useNetworkd = true;
|
||||
|
@ -20,5 +28,44 @@
|
|||
Gateway = "fe80::1";
|
||||
};
|
||||
};
|
||||
|
||||
netdevs."30-dorm" = {
|
||||
netdevConfig = {
|
||||
Kind = "wireguard";
|
||||
Name = "dorm";
|
||||
Description = "WireGuard to my Dorm Infra";
|
||||
};
|
||||
wireguardConfig = {
|
||||
PrivateKeyFile = config.sops.secrets."wireguard/dorm/private".path;
|
||||
ListenPort = 51820;
|
||||
};
|
||||
wireguardPeers = [
|
||||
{
|
||||
wireguardPeerConfig = {
|
||||
PublicKey = "vUmworuJFHjB4KUdkucQ+nzqO2ysARLomq4UuK1n430=";
|
||||
PresharedKeyFile = config.sops.secrets."wireguard/dorm/preshared".path;
|
||||
Endpoint = "dorm.vpn.rfive.de:51820";
|
||||
AllowedIPs = "10.10.10.0/24, 192.168.10.0/24";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
networks."30-dorm" = {
|
||||
matchConfig.Name = "dorm";
|
||||
networkConfig = {
|
||||
DNS = "192.168.10.1";
|
||||
};
|
||||
addresses = [
|
||||
{
|
||||
addressConfig = {
|
||||
Address = "10.10.10.4/24";
|
||||
RouteMetric = 30;
|
||||
};
|
||||
}
|
||||
];
|
||||
routes = [
|
||||
{ routeConfig = { Gateway = "0.0.0.0"; Destination = "192.168.10.0/24"; Metric = 30; }; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue