inputs: { config, ... }: { services.gotify = { enable = true; port = 8082; }; # TODO: add proper boot notification /* systemd.services.gotify-notify-boot = { after = [ "gotify-server.service" ]; wantedBy = [ "multi-user.target" ]; restartIfChanged = false; serviceConfig = { Type = "oneshot"; # Priority is needed because there is no configuration, hence no default # priority to fallback to ExecStart = let params = lib.cli.toGNUCommandLineShell { } { url = "http://localhost:${toString config.services.gotify.port}"; token = "$GOTIFY_TOKEN"; priority = 0; }; in "${pkgs.gotify-cli}/bin/gotify push ${params} 'The system has booted'"; RemainAfterExit = "yes"; # Adds lots of security options DynamicUser = "yes"; EnvironmentFile = "/etc/nixos/res/gotify-config.env"; Restart = "on-failure"; RestartSec = "3s"; }; }; */ networking.firewall.interfaces.${config.topology.mainVpn.interfaceName}.allowedTCPPorts = [ config.services.gotify.port ]; }