radarr: init at 0.2.0.553 + nixos module
This commit is contained in:
parent
2db5c5cfe2
commit
b35d22b30c
@ -296,6 +296,7 @@
|
||||
./services/misc/parsoid.nix
|
||||
./services/misc/phd.nix
|
||||
./services/misc/plex.nix
|
||||
./services/misc/radarr.nix
|
||||
./services/misc/redmine.nix
|
||||
./services/misc/rippled.nix
|
||||
./services/misc/ripple-rest.nix
|
||||
|
44
nixos/modules/services/misc/radarr.nix
Normal file
44
nixos/modules/services/misc/radarr.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ config, pkgs, lib, mono, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.radarr;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.radarr = {
|
||||
enable = mkEnableOption "Radarr";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.radarr = {
|
||||
description = "Radarr";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
test -d /var/lib/radarr/ || {
|
||||
echo "Creating radarr data directory in /var/lib/radarr/"
|
||||
mkdir -p /var/lib/radarr/
|
||||
}
|
||||
chown -R radarr /var/lib/radarr/
|
||||
chmod 0700 /var/lib/radarr/
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "radarr";
|
||||
Group = "nogroup";
|
||||
PermissionsStartOnly = "true";
|
||||
ExecStart = "${pkgs.radarr}/bin/Radarr";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.radarr = {
|
||||
home = "/var/lib/radarr";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
31
pkgs/servers/radarr/default.nix
Normal file
31
pkgs/servers/radarr/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchurl, mono, libmediainfo, sqlite, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "radarr-${version}";
|
||||
version = "0.2.0.535";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Radarr/Radarr/releases/download/v${version}/Radarr.develop.${version}.linux.tar.gz";
|
||||
sha256 = "1ccvblklqn5iki7gc16bzzbwms28mv4kxzv1nwhlm9vf0cw4qxbr";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,share/${name}}
|
||||
cp -r * $out/share/${name}/.
|
||||
|
||||
makeWrapper "${mono}/bin/mono" $out/bin/Radarr \
|
||||
--add-flags "$out/share/${name}/Radarr.exe" \
|
||||
--prefix LD_LIBRARY_PATH ':' "${sqlite.out}/lib" \
|
||||
--prefix LD_LIBRARY_PATH ':' "${libmediainfo}/lib"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A Usenet/BitTorrent movie downloader.";
|
||||
homepage = https://radarr.video/;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -3670,6 +3670,8 @@ with pkgs;
|
||||
|
||||
radamsa = callPackage ../tools/security/radamsa { };
|
||||
|
||||
radarr = callPackage ../servers/radarr { };
|
||||
|
||||
radvd = callPackage ../tools/networking/radvd { };
|
||||
|
||||
rambox = callPackage ../applications/networking/instant-messengers/rambox { };
|
||||
|
Loading…
Reference in New Issue
Block a user