From 2c8770ad70191ea8924ea67f901c9644033274cd Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 22 May 2021 22:50:05 +0200 Subject: [PATCH] services: podgrab: switch to upstream service --- services/podgrab.nix | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/services/podgrab.nix b/services/podgrab.nix index bfccc72..47b0b73 100644 --- a/services/podgrab.nix +++ b/services/podgrab.nix @@ -7,8 +7,6 @@ let domain = config.networking.domain; podgrabDomain = "podgrab.${domain}"; - - podgrabPkg = pkgs.podgrab; in { options.my.services.podgrab = with lib; { @@ -33,24 +31,9 @@ in }; config = lib.mkIf cfg.enable { - systemd.services.podgrab = { - description = "Podgrab podcast manager"; - wantedBy = [ "multi-user.target" ]; - environment = { - CONFIG = "/var/lib/podgrab/config"; - DATA = "/var/lib/podgrab/data"; - GIN_MODE = "release"; - PORT = toString cfg.port; - }; - serviceConfig = { - DynamicUser = true; - EnvironmentFile = lib.optional (cfg.passwordFile != null) [ - cfg.passwordFile - ]; - ExecStart = "${podgrabPkg}/bin/podgrab"; - WorkingDirectory = "${podgrabPkg}/share"; - StateDirectory = [ "podgrab/config" "podgrab/data" ]; - }; + services.podgrab = { + enable = true; + inherit (cfg) passwordFile port; }; services.nginx.virtualHosts."${podgrabDomain}" = {