Compare commits

...

6 commits

Author SHA1 Message Date
7e35ac6d43 enable autoupdates 2024-05-01 12:10:46 +02:00
5d64e0d032 auto generate hostnames for webserver 2024-05-01 12:09:13 +02:00
b78fdc1559 add some more web services 2024-05-01 12:02:01 +02:00
5e5f0bcee3 router fix error 2024-05-01 12:00:52 +02:00
9362c99b01 fix for router 2024-05-01 11:09:54 +02:00
4a1f06e020 update router config 2024-05-01 11:02:42 +02:00
3 changed files with 45 additions and 58 deletions

View file

@ -81,13 +81,13 @@
systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000; systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000;
system.autoUpgrade = { system.autoUpgrade = {
enable = false; enable = true;
dates = "minutely"; dates = "hourly";
flake = "git+https://git.missing.ninja/lf3/server-conf.git"; flake = "git+https://git.missing.ninja/lf3/server-conf.git";
}; };
networking.hosts = { networking.hosts = {
"192.168.88.251" = [ "wiki.it3" ]; "192.168.88.251" = builtins.attrNames self.nixosConfigurations.mio-mio-mate.config.services.nginx.virtualHosts;
"192.168.88.1" = [ "router" ]; "192.168.88.1" = [ "router" ];
}; };

View file

@ -1,4 +1,5 @@
{ {
# Resret router with /system reset-configuration keep-users no-defaults run-after-reset=router-config.rsc
"/interface bridge" = [ "/interface bridge" = [
{ {
auto-mac = "no"; auto-mac = "no";
@ -101,78 +102,34 @@
} }
]; ];
"/ip dns" = { "/ip dns" = {
"allow-remote-requests" = "yes"; no_label = {
allow-remote-requests = "yes";
servers = "1.1.1.1,1.0.0.1"; servers = "1.1.1.1,1.0.0.1";
}; };
};
"/ip dns static" = [ "/ip dns static" = [
{ {
address = "192.168.88.1"; address = "192.168.88.1";
name = "router.lan"; name = "router.lan";
} }
]; ];
"/ip firewall address-list" = [
{
address = "10.10.10.10-10.10.10.10.254";
list = "allowed_to_router";
}
];
"/ip firewall filter" = [ "/ip firewall filter" = [
{ {
action = "accept"; action = "accept";
chain = "input"; chain = "input";
comment = "defconf: accept established,related,untracked"; src-address-list = "allowed_to_router";
"connection-state" = "established,related,untracked";
}
{
action = "drop";
chain = "input";
comment = "defconf: drop invalid";
"connection-state" = "invalid";
} }
{ {
action = "accept"; action = "accept";
chain = "input"; chain = "input";
comment = "defconf: accept ICMP";
protocol = "icmp"; protocol = "icmp";
} }
{
action = "drop";
chain = "input";
comment = "defconf: drop all not coming from LAN";
"in-interface-list" = "!LAN";
}
{
action = "accept";
chain = "forward";
comment = "defconf: accept in ipsec policy";
"ipsec-policy" = "in,ipsec";
}
{
action = "accept";
chain = "forward";
comment = "defconf: accept out ipsec policy";
"ipsec-policy" = "out,ipsec";
}
{
action = "fasttrack-connection";
chain = "forward";
comment = "defconf: fasttrack";
"connection-state" = "established,related";
}
{
action = "accept";
chain = "forward";
comment = "defconf: accept established,related, untracked";
"connection-state" = "established,related,untracked";
}
{
action = "drop";
chain = "forward";
comment = "defconf: drop invalid";
"connection-state" = "invalid";
}
{
action = "drop";
chain = "forward";
comment = "defconf: drop all from WAN not DSTNATed";
"connection-nat-state" = "!dstnat";
"connection-state" = "new";
"in-interface-list" = "WAN";
}
]; ];
"/ip firewall nat" = [ "/ip firewall nat" = [
{ {

View file

@ -49,6 +49,13 @@
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts = {
"manga.it3" = {
locations."/" = {
proxyPass = "http://localhost:8080/";
};
};
};
}; };
services.dnsmasq = { services.dnsmasq = {
@ -72,4 +79,27 @@
nginx.hostName = "wiki.it3"; nginx.hostName = "wiki.it3";
passwordFile = "${../../init/mediawiki}"; passwordFile = "${../../init/mediawiki}";
}; };
services.suwayomi-server = {
enable = true;
settings = {
server = {
systemTrayEnabled = true;
extensionRepos = [
"https://raw.githubusercontent.com/keiyoushi/extensions/repo/index.min.json"
];
webUIEnabled = true;
initialOpenInBrowserEnabled = true;
webUIInterface = "browser";
webUIFlavor = "WebUI";
};
};
};
services.freshrss = {
enable = true;
virtualHost = "rss.it3";
authType = "none";
baseUrl = "http://rss.it3";
};
} }