Format nix files using new formatter
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let wireguard_port = "1194";
|
||||
let
|
||||
wireguard_port = "1194";
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Set hostname, hostid and enable WiFi
|
||||
networking = {
|
||||
hostName = "panacea";
|
||||
@@ -77,11 +84,13 @@ in {
|
||||
PrivateKeyFile = config.age.secrets.wireguard.path;
|
||||
FirewallMark = 34952;
|
||||
};
|
||||
wireguardPeers = [{
|
||||
PublicKey = "GN8lqPBZYOulh6xD4GhkoEWI65HMMCpSxJSH5871YnU=";
|
||||
AllowedIPs = [ "0.0.0.0/0" ];
|
||||
Endpoint = "coolneng.duckdns.org:1194";
|
||||
}];
|
||||
wireguardPeers = [
|
||||
{
|
||||
PublicKey = "GN8lqPBZYOulh6xD4GhkoEWI65HMMCpSxJSH5871YnU=";
|
||||
AllowedIPs = [ "0.0.0.0/0" ];
|
||||
Endpoint = "coolneng.duckdns.org:1194";
|
||||
}
|
||||
];
|
||||
};
|
||||
systemd.network.networks."wg0" = {
|
||||
matchConfig.Name = "wg0";
|
||||
@@ -90,20 +99,22 @@ in {
|
||||
Address = "10.8.0.2/32";
|
||||
DNS = "10.8.0.1";
|
||||
DNSDefaultRoute = true;
|
||||
Domains = "~.";
|
||||
MulticastDNS = "yes";
|
||||
};
|
||||
routingPolicyRules = [{
|
||||
FirewallMark = 34952;
|
||||
InvertRule = true;
|
||||
Table = 1000;
|
||||
Priority = 10;
|
||||
}];
|
||||
routes = [{
|
||||
Gateway = "10.8.0.1";
|
||||
GatewayOnLink = true;
|
||||
Table = 1000;
|
||||
}];
|
||||
routingPolicyRules = [
|
||||
{
|
||||
FirewallMark = 34952;
|
||||
InvertRule = true;
|
||||
Table = 1000;
|
||||
Priority = 10;
|
||||
}
|
||||
];
|
||||
routes = [
|
||||
{
|
||||
Gateway = "10.8.0.1";
|
||||
GatewayOnLink = true;
|
||||
Table = 1000;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Firewall configuration
|
||||
|
||||
Reference in New Issue
Block a user