Compare commits

...

4 commits

9 changed files with 137 additions and 1468 deletions

View file

@ -50,7 +50,6 @@ import "${nixpkgs}/nixos/lib/eval-config.nix" {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
# Packages comming from other repositories
jackett = pkgs.callPackage ../packages/jackett { };
lila-build-hook = (import inputs.lila).packages.${system}.utils;
statelessUptimeKuma =
pkgs.callPackage "${inputs.stateless-uptime-kuma}/stateless-uptime-kuma.nix"

View file

@ -65,10 +65,6 @@
services.postgresql.enable = true;
programs.dconf.enable = true;
services.emacs = {
enable = true;
package = pkgs.emacs30-pgtk;
};
services.udev.packages = [ pkgs.nitrokey-udev-rules ];

View file

@ -52,6 +52,14 @@
programs.mu.enable = true;
programs.emacs = {
enable = true;
package = pkgs.emacs30;
extraPackages = epkgs: [
epkgs.mu4e
];
};
home.packages = with pkgs; [
du-dust
kitty
@ -102,6 +110,8 @@
tuba
resources
notify-client
emacs-lsp-booster
pyright
];
fonts.fontconfig.enable = true;
@ -138,6 +148,7 @@
"Zotero"
".config/dconf"
".local/share/keyrings"
".cache/mu"
];
allowOther = true;
};

View file

@ -23,7 +23,7 @@
settings = {
ACME_ACCEPT_TERMS = "true";
ACME_EMAIL = "julien@malka.sh";
ACME_EMAIL = "acme@malka.sh";
DNS_PROVIDER = "gandiv5";
ENABLE_HTTP_SERVER = "false";
GITEA_ROOT = "https://git.luj.fr";

View file

@ -35,7 +35,13 @@ in
services.jackett = {
enable = true;
# unstable version to have updated torrent list
package = pkgs.jackett;
package = pkgs.unstable.jackett.overrideAttrs (
_: _: {
postInstall = ''
cp ${./ygg-api.yml} $out/lib/jackett/Definitions/ygg-api.yml
'';
}
);
inherit (cfg) user group;
};
}

117
modules/jackett/ygg-api.yml Normal file
View file

@ -0,0 +1,117 @@
---
id: ygg-api
name: Ygg API
description: Indexeur non officiel pour ygg.re MOVIES / TV
language: fr-FR
type: private
encoding: UTF-8
testlinktorrent: false
links:
- https://yggapi.eu/
caps:
categorymappings:
- {id: 2178, cat: Movies/Other, desc: "Films danimation"}
- {id: 2179, cat: TV/Anime, desc: "Séries danimation / Mangas"}
- {id: 2183, cat: Movies, desc: "Films"}
- {id: 2184, cat: TV, desc: "Séries"}
modes:
search: [q]
tv-search: [q, season, ep]
movie-search: [q, year]
allowrawsearch: true
settings:
- name: passkey
type: password
label: Passkey
- name: info_key
type: info
label: About your passkey
default: "You will find your passkey on the <a href=\"https://www.ygg.re/user/account\" target=\"_blank\">YGG</a> account page."
- name: sort
type: select
label: Sort requested from site
default: uploaded_at
options:
uploaded_at: publish_date
seeders: seeders
downloads: downloads
- name: multilang
type: checkbox
label: Replace MULTi by another language in release name
default: false
- name: multilanguage
type: select
label: Replace MULTi by this language
default: FRENCH
options:
FRENCH: FRENCH
MULTi.FRENCH: MULTi.FRENCH
ENGLISH: ENGLISH
MULTi.ENGLISH: MULTi.ENGLISH
VOSTFR: VOSTFR
MULTi.VOSTFR: MULTi.VOSTFR
- name: info_downloads
type: info
label: About missing Downloads
default: "If the torrent has no seeder and no leecher then the torrent file may be missing and download may fail."
search:
paths:
- path: torrents
response:
type: json
inputs:
$raw: "{{ range .Categories }}&category_id={{.}}{{end}}"
q: "{{ .Keywords }}"
page: 1
per_page: 100
order_by: "{{ .Config.sort }}"
rows:
selector: $
missingAttributeEqualsNoResults: true
fields:
category:
selector: category_id
title_normal:
selector: title
title_multilang:
text: "{{ .Result.title_normal }}"
filters:
- name: re_replace
args: ["(?i)[\\.](MULTI(?!.*(?:FRENCH|ENGLISH|VOSTFR)))[\\.]", ".{{ .Config.multilanguage }}."]
title:
text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{ else }}{{ .Result.title_normal }}{{ end }}"
_id:
selector: id
details:
text: "torrent/{{ .Result._id }}"
download:
text: "torrent/{{ .Result._id }}/download?passkey={{ .Config.passkey }}"
year:
selector: title
filters:
- name: regexp
args: (\b(19|20)\d{2}\b)
size:
selector: size
seeders:
selector: seeders
leechers:
selector: leechers
grabs:
selector: downloads
optional: true
default: 0
date:
# unix
selector: uploaded_at
downloadvolumefactor:
text: 1
uploadvolumefactor:
text: 1
# JSON 1.0.0

View file

@ -28,7 +28,7 @@ in
enable = mkEnableOption "activate nginx service";
email = mkOption {
type = types.str;
default = "julien@malka.sh";
default = "acme@malka.sh";
};
};

View file

@ -1,52 +0,0 @@
{
lib,
stdenv,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
openssl,
mono,
}:
buildDotnetModule rec {
pname = "jackett";
version = "0.21.2688";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha512-ofKCk1vWPbn3dFQ8qt7ieTXzkyFUoRGWsKGLpBZGEduX71aGX1M8wri27nt27FShb1Q7gVbGqUq6RHQI4bwnlQ==";
};
projectFile = "src/Jackett.Server/Jackett.Server.csproj";
nugetDeps = ./deps.nix;
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
dotnetInstallFlags = [ "-p:TargetFramework=net6.0" ];
runtimeDeps = [ openssl ];
doCheck = !(stdenv.isDarwin && stdenv.isAarch64); # mono is not available on aarch64-darwin
nativeCheckInputs = [ mono ];
testProjectFile = "src/Jackett.Test/Jackett.Test.csproj";
postFixup = ''
# For compatibility
ln -s $out/bin/jackett $out/bin/Jackett || :
ln -s $out/bin/Jackett $out/bin/jackett || :
'';
meta = with lib; {
description = "API Support for your favorite torrent trackers";
homepage = "https://github.com/Jackett/Jackett/";
changelog = "https://github.com/Jackett/Jackett/releases/tag/v${version}";
license = licenses.gpl2Only;
maintainers = with maintainers; [
edwtjo
nyanloutre
purcell
];
};
}

File diff suppressed because it is too large Load diff