Merge pull request #241247 from al3xtjames/flood-for-transmission

flood-for-transmission: init at 2023-11-17T12-46-13
This commit is contained in:
Doron Behar
2023-12-27 11:04:32 +00:00
committed by GitHub
5 changed files with 67 additions and 2 deletions
+9
View File
@@ -711,6 +711,15 @@
githubId = 20405311;
name = "Aksh Gupta";
};
al3xtjames = {
email = "nix@alextjam.es";
github = "al3xtjames";
githubId = 5672538;
name = "Alex James";
keys = [{
fingerprint = "F354 FFAB EA89 A49D 33ED 2590 4729 B829 AC5F CC72";
}];
};
alanpearce = {
email = "alan@alanpearce.eu";
github = "alanpearce";
@@ -251,6 +251,20 @@ in
For instance, SSH sessions may time out more easily.
'';
};
webHome = mkOption {
type = types.nullOr types.path;
default = null;
example = "pkgs.flood-for-transmission";
description = lib.mdDoc ''
If not `null`, sets the value of the `TRANSMISSION_WEB_HOME`
environment variable used by the service. Useful for overriding
the web interface files, without overriding the transmission
package and thus requiring rebuilding it locally. Use this if
you want to use an alternative web interface, such as
`pkgs.flood-for-transmission`.
'';
};
};
};
@@ -280,6 +294,7 @@ in
requires = optional apparmor.enable "apparmor.service";
wantedBy = [ "multi-user.target" ];
environment.CURL_CA_BUNDLE = etc."ssl/certs/ca-certificates.crt".source;
environment.TRANSMISSION_WEB_HOME = lib.optionalString (cfg.webHome != null) cfg.webHome;
serviceConfig = {
# Use "+" because credentialsFile may not be accessible to User= or Group=.
@@ -492,6 +507,10 @@ in
# https://gitlab.com/apparmor/apparmor/-/wikis/AppArmorStacking#seccomp-and-no_new_privs
px ${cfg.settings.script-torrent-done-filename} -> &@{dirs},
''}
${optionalString (cfg.webHome != null) ''
r ${cfg.webHome}/**,
''}
'';
};
@@ -0,0 +1,37 @@
# To use this package, use: `services.transmission.webHome = pkgs.flood-for-transmission;`
{ lib
, buildNpmPackage
, fetchFromGitHub
}:
buildNpmPackage rec {
pname = "flood-for-transmission";
version = "2023-11-17T12-46-13";
src = fetchFromGitHub {
owner = "johman10";
repo = pname;
rev = version;
hash = "sha256-TaLWhly/4hOigWY1XP7FmgN4LbrdLb79NQ47z5JiiYE=";
};
npmDepsHash = "sha256-PCeknfS81K8ttU4hV2D841tgQsGfIVaAOVIEDXe8fVQ=";
npmInstallFlags = [ "--legacy-peer-deps" ];
installPhase = ''
runHook preInstall
cp -r public $out
runHook postInstall
'';
meta = with lib; {
description = "A Flood clone for Transmission";
homepage = "https://github.com/johman10/flood-for-transmission";
maintainers = with maintainers; [ al3xtjames ];
license = licenses.gpl3Only;
platforms = platforms.all;
};
}
@@ -35,7 +35,6 @@
, enableCli ? true
, installLib ? false
, apparmorRulesFromClosure
, extraAppArmorPaths ? []
}:
stdenv.mkDerivation (finalAttrs: {
@@ -136,7 +135,6 @@ stdenv.mkDerivation (finalAttrs: {
rwk /tmp/tr_session_id_*,
r $out/share/transmission/public_html/**,
${lib.strings.concatMapStrings (x: "r ${x},\n") extraAppArmorPaths}
include <local/bin.transmission-daemon>
}
+2
View File
@@ -3864,6 +3864,8 @@ with pkgs;
flood = callPackage ../applications/networking/p2p/flood { };
flood-for-transmission = callPackage ../applications/networking/p2p/flood-for-transmission { };
font-config-info = callPackage ../tools/misc/font-config-info { };
foxdot = with python3Packages; toPythonApplication foxdot;