From 943ea20b165bc89f6bc00d73a892b22a22ff9e2b 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}" = {