Retire monolith from all services

This commit is contained in:
2020-06-09 21:53:20 +02:00
parent 993404088a
commit 59bb473451
3 changed files with 32 additions and 46 deletions

View File

@@ -1,15 +1,10 @@
{ config, pkgs, lib, ... }:
let password = builtins.readFile /var/lib/ddclient/token;
let password = builtins.readFile /var/lib/ddclient/token;
in
{
in {
environment.systemPackages = with pkgs; [
avahi
ddclient
wireguard
];
environment.systemPackages = with pkgs; [ avahi ddclient wireguard mbuffer ];
# Enable zeroconf
services.avahi = {
@@ -18,11 +13,12 @@
publish = {
enable = true;
userServices = true;
domain = true;
workstation = true;
};
reflector = true;
};
# Dynamic DNS configuration
services.ddclient = {
enable = true;
@@ -46,8 +42,8 @@
autoLoadConntrackHelpers = true;
connectionTrackingModules = [ "sane" ];
extraCommands = ''
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
'';
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
'';
};
# Disable IPv6
@@ -67,9 +63,9 @@
listenPort = 1194;
privateKeyFile = "/home/coolneng/.wg/keys/privatekey";
peers = [
# Monolith
# Panacea
{
publicKey = "ka9a/VB49XMtrMw/ZJmZHThfk2Y5D/8wErLPtN+KvHE=";
publicKey = "XMkTztU2Y8hw6Fu/2o4Gszij+EmNacvFMXuZyHS1n38=";
allowedIPs = [ "10.8.0.2/32" ];
}
# Roamer
@@ -77,11 +73,6 @@
publicKey = "gS5VIUFL74kTs3zxVNT/ijWyOjeAFLEqWynD0Pefh1o=";
allowedIPs = [ "10.8.0.3/32" ];
}
# Panacea
{
publicKey = "XMkTztU2Y8hw6Fu/2o4Gszij+EmNacvFMXuZyHS1n38=";
allowedIPs = [ "10.8.0.4/32" ];
}
];
};
};