xin/hosts/faf/default.nix

129 lines
3.7 KiB
Nix
Raw Normal View History

2023-07-11 09:12:50 -06:00
{config, ...}: let
2022-08-25 12:21:35 -06:00
pubKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPMaAm4rDxyU975Z54YiNw3itC2fGc3SaE2VaS1fai8 root@box"
];
2022-11-07 11:53:06 -07:00
userBase = {
openssh.authorizedKeys.keys = pubKeys ++ config.myconf.managementPubKeys;
};
2022-08-25 12:21:35 -06:00
in {
_module.args.isUnstable = false;
2023-07-11 09:12:50 -06:00
imports = [./hardware-configuration.nix];
2022-08-25 12:21:35 -06:00
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
2023-07-11 09:12:50 -06:00
boot.supportedFilesystems = ["zfs"];
2022-08-25 12:21:35 -06:00
boot.zfs.devNodes = "/dev/";
networking = {
hostName = "faf";
hostId = "12963a2a";
useDHCP = false;
interfaces.enp1s0.useDHCP = true;
interfaces.enp2s0.useDHCP = true;
2023-07-11 09:12:50 -06:00
firewall.allowedTCPPorts = [22 53 config.services.prometheus.exporters.node.port];
firewall.allowedUDPPorts = [53];
hosts = {"100.122.61.43" = ["nix-binary-cache.humpback-trout.ts.net"];};
};
2022-08-25 12:21:35 -06:00
users.users.root = userBase;
users.users.qbit = userBase;
services = {
2022-09-02 18:46:43 -06:00
prometheus = {
enable = true;
port = 9001;
exporters = {
node = {
enable = true;
2023-07-11 09:12:50 -06:00
enabledCollectors = ["systemd"];
2022-09-02 18:46:43 -06:00
port = 9002;
};
};
};
2022-08-25 12:21:35 -06:00
adguardhome = {
enable = false;
openFirewall = true;
settings = {
bind_port = 3000;
2022-08-25 12:21:35 -06:00
user_rules = [
"# Stuff from kyle"
"# some google stuff that wasn't being blocked"
"||googleadservices.com^"
"||imasdk.googleapis.com^"
"# some advertising stuff I saw on my network"
"||adjust.com^"
"||appsflyer.com^"
"||doubleclick.net^"
"||googleadservices.com^"
"||raygun.io^"
"||pizzaseo.com^"
"||scorecardresearch.com^"
"# annoying website 'features'"
"||drift.com^"
"||driftcdn.com^"
"||driftt.com^"
"||driftt.imgix.net^"
"||intercomcdn.com^"
"||intercom.io^"
"||salesforceliveagent.com^"
"||viafoura.co^"
"||viafoura.com^"
];
filters = [
{
name = "AdGuard DNS filter";
2023-07-11 09:12:50 -06:00
url = "https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt";
2022-08-25 12:21:35 -06:00
enabled = true;
}
{
name = "AdaAway Default Blocklist";
url = "https://adaway.org/hosts.txt";
enabled = true;
}
{
name = "OISD";
url = "https://abp.oisd.nl";
enabled = true;
}
];
dns = {
statistics_interval = 90;
bind_host = "10.6.0.245";
bootstrap_dns = "10.6.0.1";
};
};
};
unbound = {
enable = true;
settings = {
server = {
2023-07-11 09:12:50 -06:00
interface = ["100.64.130.122"];
access-control = ["100.64.0.0/10 allow"];
2022-08-25 12:21:35 -06:00
};
local-zone = ''"bold.daemon." static'';
local-data = [
2022-09-03 18:55:28 -06:00
''"books.bold.daemon. IN A 100.120.151.126"''
2022-08-25 12:21:35 -06:00
''"headphones.bold.daemon. IN A 100.120.151.126"''
2022-09-03 18:55:28 -06:00
''"jelly.bold.daemon. IN A 100.120.151.126"''
2022-08-25 12:21:35 -06:00
''"lidarr.bold.daemon. IN A 100.120.151.126"''
''"nzb.bold.daemon. IN A 100.120.151.126"''
2022-09-03 18:55:28 -06:00
''"prowlarr.bold.daemon. IN A 100.120.151.126"''
''"radarr.bold.daemon. IN A 100.120.151.126"''
''"reddit.bold.daemon. IN A 100.120.151.126"''
''"sonarr.bold.daemon. IN A 100.120.151.126"''
2023-07-31 15:45:35 -06:00
''"readarr.bold.daemon. IN A 100.120.151.126"''
2022-11-25 13:06:29 -07:00
''"graph.bold.daemon. IN A 100.120.151.126"''
2023-06-05 18:18:55 -06:00
''"invidious.bold.daemon. IN A 100.120.151.126"''
2022-12-12 07:49:18 -07:00
''"router.bold.daemon. IN A 10.6.0.1"''
2022-08-25 12:21:35 -06:00
];
};
};
};
system.stateVersion = "21.11"; # Did you read the comment?
}