Skip to content

Commit

Permalink
Fixed docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Mar 1, 2024
1 parent a438ccb commit ac416f2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Store docs
uses: actions/upload-artifact@v4
with:
name: docs
name: test
path: ./out

deploy-docs:
Expand All @@ -62,6 +62,8 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v3

- run: tree

- name: Upload GH pages artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
11 changes: 6 additions & 5 deletions mkDocs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ in
buildInputs = with pkgs; [pandoc];
phases = ["unpackPhase" "buildPhase"];
buildPhase = ''
#tmpdir=$(mktemp -d)
tmpdir="$out/debug"
#tmpdir="$out/debug"
#mkdir -p $tmpdir
tmpdir=$(mktemp -d)
mkdir -p $out
mkdir -p $tmpdir
cp -r docs $out
cd $out
# Generate md docs
cat ${optionsDocNixos.optionsCommonMark} > "$tmpdir"/nixos.md
Expand Down Expand Up @@ -63,6 +64,6 @@ in
-V --mathjax \
-f markdown+smart \
-o $out/index.html \
"$tmpdir/index.md"
README.md
'';
}
9 changes: 5 additions & 4 deletions nixarr/transmission/cross-seed/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"];
Expand Down
21 changes: 21 additions & 0 deletions nixarr/transmission/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "upnp-ports";

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.";
Expand Down Expand Up @@ -63,6 +77,13 @@ in {
Enable the cross-seed service.
'';
};
indexIds = mkOption {
type = with types; listOf int;
default = [];
description = ''
list of indexers TODO: todo
'';
};
};
};

Expand Down

0 comments on commit ac416f2

Please sign in to comment.