overseerr: init at 1.34.0 (#399266)

Changed files
+191
maintainers
nixos
doc
manual
release-notes
modules
tests
pkgs
by-name
ov
overseerr
+5
maintainers/maintainer-list.nix
···
name = "Jez Cope";
keys = [ { fingerprint = "D9DA 3E47 E8BD 377D A317 B3D0 9E42 CE07 1C45 59D1"; } ];
+
jf-uu = {
+
github = "jf-uu";
+
githubId = 181011550;
+
name = "jf-uu";
+
};
jfchevrette = {
email = "jfchevrette@gmail.com";
github = "jfchevrette";
+2
nixos/doc/manual/release-notes/rl-2511.section.md
···
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+
- [Overseerr](https://overseerr.dev), a request management and media discovery tool for the Plex ecosystem. Available as [services.overseerr](#opt-services.overseerr.enable).
+
- [gtklock](https://github.com/jovanlanik/gtklock), a GTK-based lockscreen for Wayland. Available as [programs.gtklock](#opt-programs.gtklock.enable).
- [Chrysalis](https://github.com/keyboardio/Chrysalis), a graphical configurator for Kaleidoscope-powered keyboards. Available as [programs.chrysalis](#opt-programs.chrysalis.enable).
+1
nixos/modules/module-list.nix
···
./services/misc/open-webui.nix
./services/misc/orthanc.nix
./services/misc/osrm.nix
+
./services/misc/overseerr.nix
./services/misc/owncast.nix
./services/misc/packagekit.nix
./services/misc/paisa.nix
+89
nixos/modules/services/misc/overseerr.nix
···
+
{
+
config,
+
pkgs,
+
lib,
+
...
+
}:
+
+
let
+
cfg = config.services.overseerr;
+
in
+
{
+
meta.maintainers = [ lib.maintainers.jf-uu ];
+
+
options.services.overseerr = {
+
enable = lib.mkEnableOption "Overseerr, a request management and media discovery tool for the Plex ecosystem";
+
+
package = lib.mkPackageOption pkgs "overseerr" { };
+
+
openFirewall = lib.mkOption {
+
type = lib.types.bool;
+
default = false;
+
description = "Open a port in the firewall for the Overseerr web interface.";
+
};
+
+
port = lib.mkOption {
+
type = lib.types.port;
+
default = 5055;
+
description = "The port which the Overseerr web UI should listen on.";
+
};
+
};
+
+
config = lib.mkIf cfg.enable {
+
systemd.services.overseerr = {
+
description = "Request management and media discovery tool for the Plex ecosystem";
+
after = [ "network.target" ];
+
wantedBy = [ "multi-user.target" ];
+
environment = {
+
CONFIG_DIRECTORY = "/var/lib/overseerr";
+
PORT = toString cfg.port;
+
};
+
serviceConfig = {
+
CapabilityBoundingSet = "";
+
DynamicUser = true;
+
ExecStart = lib.getExe cfg.package;
+
LockPersonality = true;
+
NoNewPrivileges = true;
+
PrivateDevices = true;
+
PrivateIPC = true;
+
PrivateMounts = true;
+
PrivateTmp = true;
+
PrivateUsers = true;
+
ProcSubset = "pid";
+
ProtectClock = true;
+
ProtectControlGroups = true;
+
ProtectHome = true;
+
ProtectHostname = true;
+
ProtectKernelLogs = true;
+
ProtectKernelModules = true;
+
ProtectKernelTunables = true;
+
ProtectProc = "invisible";
+
ProtectSystem = "strict";
+
RemoveIPC = true;
+
Restart = "on-failure";
+
RestrictAddressFamilies = [
+
"AF_INET"
+
"AF_INET6"
+
"AF_UNIX"
+
];
+
RestrictNamespaces = true;
+
RestrictRealtime = true;
+
RestrictSUIDSGID = true;
+
StateDirectory = "overseerr";
+
StateDirectoryMode = "0700";
+
SystemCallArchitectures = "native";
+
SystemCallErrorNumber = "EPERM";
+
SystemCallFilter = [
+
"@system-service"
+
"~@privileged"
+
"~@resources"
+
];
+
Type = "exec";
+
};
+
};
+
+
networking.firewall = lib.mkIf cfg.openFirewall {
+
allowedTCPPorts = [ cfg.port ];
+
};
+
};
+
}
+1
nixos/tests/all-tests.nix
···
};
oku = runTest ./oku.nix;
oncall = runTest ./web-apps/oncall.nix;
+
overseerr = runTest ./overseerr.nix;
# 9pnet_virtio used to mount /nix partition doesn't support
# hibernation. This test happens to work on x86_64-linux but
# not on other platforms.
+20
nixos/tests/overseerr.nix
···
+
{ lib, pkgs, ... }:
+
{
+
name = "overseerr";
+
meta.maintainers = with lib.maintainers; [ jf-uu ];
+
+
nodes.machine =
+
{ pkgs, ... }:
+
{
+
environment.systemPackages = [ pkgs.jq ];
+
services.overseerr.enable = true;
+
};
+
+
testScript = ''
+
machine.wait_for_unit("overseerr.service")
+
machine.wait_for_open_port(5055)
+
+
version = machine.succeed("curl --fail http://localhost:5055/api/v1/status | jq --raw-output .version").rstrip("\n")
+
assert version == "${pkgs.overseerr.version}", f"expected version to be ${pkgs.overseerr.version}, got {version}"
+
'';
+
}
+73
pkgs/by-name/ov/overseerr/package.nix
···
+
{
+
fetchFromGitHub,
+
fetchYarnDeps,
+
lib,
+
makeWrapper,
+
node-gyp,
+
node-pre-gyp,
+
nodejs,
+
python3,
+
stdenv,
+
yarnBuildHook,
+
yarnConfigHook,
+
yarnInstallHook,
+
}:
+
+
stdenv.mkDerivation rec {
+
pname = "overseerr";
+
version = "1.34.0";
+
+
src = fetchFromGitHub {
+
owner = "sct";
+
repo = "overseerr";
+
tag = "v${version}";
+
hash = "sha256-4332XsupUGjkFo0+4wn2fUyK5/y6EQoPaAuayBH/myk=";
+
};
+
+
offlineCache = fetchYarnDeps {
+
yarnLock = "${src}/yarn.lock";
+
hash = "sha256-f30P+/DxDz9uBmdgvaYK4YOAUmVce8MUnNHBXr8/yKc=";
+
};
+
+
env.CYPRESS_INSTALL_BINARY = 0;
+
+
nativeBuildInputs = [
+
makeWrapper
+
node-gyp
+
node-pre-gyp
+
nodejs
+
python3
+
yarnBuildHook
+
yarnConfigHook
+
yarnInstallHook
+
];
+
+
postInstall = ''
+
# Fixes "Error: Cannot find module" (bcrypt) and "SQLite package has not been found installed".
+
pushd $out/lib/node_modules/overseerr/node_modules
+
for module in bcrypt sqlite3; do
+
pushd $module
+
node-pre-gyp rebuild --build-from-source --nodedir=${nodejs} --prefer-offline
+
popd
+
done
+
+
makeWrapper "${lib.getExe nodejs}" "$out/bin/overseerr" \
+
--set NODE_ENV production \
+
--chdir "$out/lib/node_modules/overseerr" \
+
--add-flags "dist/index.js" \
+
--add-flags "--"
+
'';
+
+
meta = {
+
badPlatforms = [
+
# FileNotFoundError: [Errno 2] No such file or directory: 'xcodebuild'
+
lib.systems.inspect.patterns.isDarwin
+
];
+
changelog = "https://github.com/sct/overseerr/releases/tag/v${version}";
+
description = "Request management and media discovery tool for the Plex ecosystem";
+
homepage = "https://github.com/sct/overseerr";
+
license = lib.licenses.mit;
+
mainProgram = "overseerr";
+
maintainers = with lib.maintainers; [ jf-uu ];
+
};
+
}