dotfiles/system/nixos/weewx-proxy.nix

24 lines
642 B
Nix
Raw Normal View History

2023-06-07 18:40:27 +00:00
{ pkgs, config, ... }:
{
systemd.services.weewx-proxy = {
description = "A proxy service for WeeWX sources";
wantedBy = [ "multi-user.target" ];
2024-01-21 21:55:44 +00:00
wants = [ "network-online.target" ];
2023-06-07 18:40:27 +00:00
after = [ "network-online.target" ];
serviceConfig = {
DynamicUser = true;
StateDirectory = "weewx-proxy";
EnvironmentFile = [ config.age.secrets.weewx-proxy-environment.path ];
ExecStart = "${pkgs.weewx-proxy}/bin/weewx_proxy start";
Type = "notify";
WatchdogSec = "10s";
Restart = "on-failure";
};
};
networking.firewall.interfaces."vlan51" = {
allowedTCPPorts = [ 4040 ];
};
}