diff --git a/hosts/g18-next/configuration.nix b/hosts/g18-next/configuration.nix index 63e13e7..eb95bd1 100644 --- a/hosts/g18-next/configuration.nix +++ b/hosts/g18-next/configuration.nix @@ -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"; }