switch to nixpkgs-fmt

This commit is contained in:
Tim Schubert 2022-08-04 21:13:54 +02:00
parent 8cd6ed1502
commit c43341a8b2
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
69 changed files with 664 additions and 665 deletions

View file

@ -1,13 +1,13 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib; let
cfg = config.dadada.networking;
vpnPubKey = "x/y6I59buVzv9Lfzl+b17mGWbzxU+3Ke9mQNa1DLsDI=";
in {
in
{
options = {
dadada.networking = {
localResolver = {
@ -18,7 +18,7 @@ in {
wanInterfaces = mkOption {
type = with types; listOf str;
description = "WAN network interfaces";
default = [];
default = [ ];
};
vpnExtension = mkOption {
type = with types; nullOr str;
@ -122,7 +122,7 @@ in {
networking.wireguard.interfaces = mkIf (cfg.vpnExtension != null) {
dadada = {
ips = ["fd42:9c3b:f96d:201::${cfg.vpnExtension}/64"];
ips = [ "fd42:9c3b:f96d:201::${cfg.vpnExtension}/64" ];
listenPort = 51234;
privateKeyFile = "/var/lib/wireguard/privkey";
@ -130,7 +130,7 @@ in {
peers = [
{
publicKey = vpnPubKey;
allowedIPs = ["fd42:9c3b:f96d::/48"];
allowedIPs = [ "fd42:9c3b:f96d::/48" ];
endpoint = "vpn.dadada.li:51234";
persistentKeepalive = 25;
}
@ -140,8 +140,8 @@ in {
# https://lists.zx2c4.com/pipermail/wireguard/2017-November/002028.html
systemd.timers.wg-reresolve-dns = mkIf (cfg.vpnExtension != null) {
wantedBy = ["timers.target"];
partOf = ["wg-reresolve-dns.service"];
wantedBy = [ "timers.target" ];
partOf = [ "wg-reresolve-dns.service" ];
timerConfig.OnCalendar = "hourly";
};
systemd.services.wg-reresolve-dns = mkIf (cfg.vpnExtension != null) {