services: podgrab: switch to upstream service
This commit is contained in:
parent
129fcdd42c
commit
943ea20b16
|
@ -7,8 +7,6 @@ let
|
||||||
|
|
||||||
domain = config.networking.domain;
|
domain = config.networking.domain;
|
||||||
podgrabDomain = "podgrab.${domain}";
|
podgrabDomain = "podgrab.${domain}";
|
||||||
|
|
||||||
podgrabPkg = pkgs.podgrab;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.services.podgrab = with lib; {
|
options.my.services.podgrab = with lib; {
|
||||||
|
@ -33,24 +31,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.services.podgrab = {
|
services.podgrab = {
|
||||||
description = "Podgrab podcast manager";
|
enable = true;
|
||||||
wantedBy = [ "multi-user.target" ];
|
inherit (cfg) passwordFile port;
|
||||||
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.nginx.virtualHosts."${podgrabDomain}" = {
|
services.nginx.virtualHosts."${podgrabDomain}" = {
|
||||||
|
|
Loading…
Reference in a new issue