Initial commit

This commit is contained in:
Dotfiles
2026-07-06 02:13:07 +00:00
commit 06cf1c1825
166 changed files with 5255 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
{ ... }:
{
imports = [
./firewall.nix
];
networking = {
networkmanager = {
enable = true;
dns = "systemd-resolved";
};
extraHosts = "192.168.1.60 laptop";
nftables.enable = true;
nameservers = [
"192.168.1.193" # Pi-hole
"1.1.1.1" # Cloudflare
"1.0.0.1" # Cloudflare (Secondary)
];
};
services.resolved = {
enable = true;
settings.Resolve = {
dnssec = "true";
DNSOverTLS = "true";
domains = [ "~." ];
fallbackDns = [
"192.168.1.193" # Pi-hole
"1.1.1.1" # Cloudflare
"1.0.0.1" # Cloudflare (Secondary)
];
};
};
}
+17
View File
@@ -0,0 +1,17 @@
{ ... }:
{
networking.firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [
22
80
];
allowedUDPPorts = [
53
];
};
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./core
./tailscale.nix
];
}
+25
View File
@@ -0,0 +1,25 @@
{ config, ... }:
{
services.tailscale = {
enable = true;
openFirewall = true;
extraSetFlags = [ "--operator=river" ];
};
networking.firewall = {
trustedInterfaces = [ config.services.tailscale.interfaceName ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
systemd.services.tailscaled.serviceConfig.Environment = [
"TS_DEBUG_FIREWALL_MODE=nftables"
];
systemd.network.wait-online.enable = false;
boot.initrd.systemd.network.wait-online.enable = false;
users.users.river.extraGroups = [
"tailscale"
];
}
+22
View File
@@ -0,0 +1,22 @@
{ ... }:
{
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.0.0.2/24" ];
privateKeyFile = "/etc/wireguard/private.key"; # Keep secrets out of the nix store!
peers = [
{
publicKey = "vUUL4CD+1Sa2U2SZYa2P9IoFC2HxEr+PYNmYfRE8wwY=";
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "server.maariz.org:51820";
persistentKeepalive = 25;
}
];
};
};
# Ensure the Wireguard UDP port is open if you are hosting the server
networking.firewall.allowedUDPPorts = [ 51820 ];
}