Fixed docs build
This commit is contained in:
@@ -5,25 +5,26 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.util-nixarr.services.prowlarr;
|
||||
cfg = config.util-nixarr.services.cross-seed;
|
||||
#settingsFormat = pkgs.formats.json {};
|
||||
#settingsFile = settingsFormat.generate "settings.json" cfg.settings;
|
||||
cross-seedPkg = import ../../../pkgs/cross-seed { inherit (pkgs) stdenv lib fetchFromGitHub; };
|
||||
in {
|
||||
options = {
|
||||
util-nixarr.services.prowlarr = {
|
||||
util-nixarr.services.cross-seed = {
|
||||
enable = mkEnableOption "cross-seed";
|
||||
|
||||
configFile = mkOption {
|
||||
type = with types; nullOr path;
|
||||
default = null;
|
||||
example = "/var/lib/secrets/cross-seed/settings.js";
|
||||
description = "";
|
||||
description = "cross-seed config file"; # TODO: todo
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/cross-seed";
|
||||
description = "cross-seed dataDir"; # TODO: todo
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
@@ -45,7 +46,7 @@ in {
|
||||
"d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
|
||||
systemd.services.prowlarr = {
|
||||
systemd.services.cross-seed = {
|
||||
description = "cross-seed";
|
||||
after = ["network.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
@@ -9,6 +9,20 @@ with lib; let
|
||||
cfg = config.nixarr.transmission;
|
||||
nixarr = config.nixarr;
|
||||
dnsServers = config.lib.vpn.dnsServers;
|
||||
get-indexers = with builtins; pkgs.writeShellApplication {
|
||||
name = "get-indexers";
|
||||
|
||||
runtimeInputs = with pkgs; [ jq yq ];
|
||||
|
||||
text = ''
|
||||
PROWLARR_API_KEY=$(xq '.Config.ApiKey' "${nixarr.prowlarr.stateDir}/config.xml")
|
||||
''
|
||||
+ toJson (
|
||||
map (x:
|
||||
''http://localhost:9696/${toString x}/api?apikey="$PROWLARR_API_KEY"''
|
||||
) cfg.privateTrackers.cross-seed.indexIds
|
||||
);
|
||||
};
|
||||
in {
|
||||
options.nixarr.transmission = {
|
||||
enable = mkEnableOption "the Transmission service.";
|
||||
@@ -63,6 +77,13 @@ in {
|
||||
Enable the cross-seed service.
|
||||
'';
|
||||
};
|
||||
indexIds = mkOption {
|
||||
type = with types; listOf int;
|
||||
default = [];
|
||||
description = ''
|
||||
list of indexers TODO: todo
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user