Commit a565cfea authored by Emily's avatar Emily
Browse files

antennas: drop

parent 6fa5767e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -340,6 +340,9 @@
  request #332259](https://github.com/NixOS/nixpkgs/pull/332259) if you
  are interested in maintaining a newer version.

- The `antennas` package and the `services.antennas` module have been
  removed as they only work with `tvheadend` (see above).

## Other Notable Changes {#sec-release-24.11-notable-changes}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+0 −1
Original line number Diff line number Diff line
@@ -968,7 +968,6 @@
  ./services/networking/adguardhome.nix
  ./services/networking/alice-lg.nix
  ./services/networking/amuled.nix
  ./services/networking/antennas.nix
  ./services/networking/aria2.nix
  ./services/networking/asterisk.nix
  ./services/networking/atftpd.nix
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ in
      The hidepid module was removed, since the underlying machinery
      is broken when using cgroups-v2.
    '')
    (mkRemovedOptionModule [ "services" "antennas" ] "The antennas package and the corresponding module have been removed as they only work with tvheadend, which nobody was willing to maintain and was stuck on an unmaintained version that required FFmpeg 4; please see https://github.com/NixOS/nixpkgs/pull/332259 if you are interested in maintaining a newer version.")
    (mkRemovedOptionModule [ "services" "baget" "enable" ] "The baget module was removed due to the upstream package being unmaintained.")
    (mkRemovedOptionModule [ "services" "beegfs" ] "The BeeGFS module has been removed")
    (mkRemovedOptionModule [ "services" "beegfsEnable" ] "The BeeGFS module has been removed")
+0 −77
Original line number Diff line number Diff line
{ config, lib, pkgs, ... }:

with lib;

let cfg = config.services.antennas;
in

{
  options = {
    services.antennas = {
      enable = mkEnableOption "Antennas";

      tvheadendUrl = mkOption {
        type        = types.str;
        default     = "http://localhost:9981";
        description = "URL of Tvheadend.";
      };

      antennasUrl = mkOption {
        type        = types.str;
        default     = "http://127.0.0.1:5004";
        description = "URL of Antennas.";
      };

      tunerCount = mkOption {
        type        = types.int;
        default     = 6;
        description = "Numbers of tuners in tvheadend.";
      };

      deviceUUID = mkOption {
        type        = types.str;
        default     = "2f70c0d7-90a3-4429-8275-cbeeee9cd605";
        description = "Device tuner UUID. Change this if you are running multiple instances.";
      };
    };
  };

  config = mkIf cfg.enable {
    systemd.services.antennas = {
      description = "Antennas HDHomeRun emulator for Tvheadend.";
      wantedBy    = [ "multi-user.target" ];

      # Config
      environment = {
        TVHEADEND_URL = cfg.tvheadendUrl;
        ANTENNAS_URL = cfg.antennasUrl;
        TUNER_COUNT = toString cfg.tunerCount;
        DEVICE_UUID = cfg.deviceUUID;
      };

      serviceConfig = {
        ExecStart = "${pkgs.antennas}/bin/antennas";

        # Hardening
        CapabilityBoundingSet = [ "" ];
        DynamicUser = true;
        LockPersonality = true;
        ProcSubset = "pid";
        PrivateDevices = true;
        PrivateUsers = true;
        PrivateTmp = true;
        ProtectClock = true;
        ProtectControlGroups = true;
        ProtectHome = true;
        ProtectHostname = true;
        ProtectKernelLogs = true;
        ProtectKernelModules = true;
        ProtectKernelTunables = true;
        ProtectProc = "invisible";
        ProtectSystem = "strict";
        RestrictNamespaces = true;
        RestrictRealtime = true;
      };
    };
  };
}

pkgs/servers/antennas/default.nix

deleted100644 → 0
+0 −38
Original line number Diff line number Diff line
{ lib
, buildNpmPackage
, fetchFromGitHub
}:

buildNpmPackage rec {
  pname = "antennas";
  version = "4.2.0";

  src = fetchFromGitHub {
    owner = "jfarseneau";
    repo = "antennas";
    rev = "v${version}";
    hash = "sha256-UQ+wvm7+x/evmtGwzCkUkrrDMCIZzUL4iSkLmYKJ3Mc=";
  };

  npmDepsHash = "sha256-D5ss7nCDY3ogZy64iFqLVKbmibAg7C/A+rEHJaE9c2U=";

  dontNpmBuild = true;

  doCheck = true;

  checkPhase = ''
    runHook preCheck

    npm run test

    runHook postCheck
  '';

  meta = {
    description = "HDHomeRun emulator for Plex DVR to connect to Tvheadend";
    homepage = "https://github.com/jfarseneau/antennas";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ bachp ];
    mainProgram = "antennas";
  };
}
Loading