feat(g18-next): migrate influxdb and dnsmasq

This commit is contained in:
Dict Xiong 2024-06-19 19:00:14 +08:00
parent 24cc2ea4bb
commit d15ad5507d

View File

@ -45,6 +45,7 @@ in
}
];
};
services.resolved.enable = true;
networking.firewall.extraCommands = ''
iptables -A INPUT -s 192.168.122.1 -j ACCEPT
'';
@ -80,8 +81,37 @@ in
};
};
systemd.sockets.gitea.listenStreams = [ "22" ];
systemd.services.gitea.requires = [ "gitea.socket" ];
systemd.services.gitea.requires = [ "gitea.socket" "data0.mount" ];
systemd.services.gitea.after = [ "data0.mount" ];
# service: influxdb
services.influxdb2.enable = true;
systemd.services.influxdb2.requires = [ "var-lib-influxdb2.mount" ];
systemd.services.influxdb2.after = [ "var-lib-influxdb2.mount" ];
fileSystems."/var/lib/influxdb2" = {
depends = [ "/data0" ];
device = "/data0/lib/influxdb";
options = [ "bind" ];
};
# service: dnsmasq stub dns server
services.dnsmasq = {
enable = true;
settings = {
interface = [ "enp1s0" "lo" ];
bind-interfaces = true;
domain-needed = true;
bogus-priv = true;
no-resolv = true;
no-poll = true;
domain = "nasp";
server = [
"101.6.6.6"
"1.1.1.1"
"2001:da8::666"
"/tsinghua.edu.cn/166.111.8.29"
"/tsinghua.edu.cn/166.111.8.28"
];
};
};
system.stateVersion = "24.05";
}