mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
pkgs/libreelec-dvb-firmware: init + hosts/ostara: tvheadend
Samhain has a virtualhost for it to make it accessible on Yggdrasil.
This commit is contained in:
parent
a1aafd06f7
commit
e9d795cc37
4 changed files with 70 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
{ config, users, pkgs, profiles, ... }:
|
{ lib, config, users, pkgs, profiles, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./hw.nix profiles.laptop ];
|
imports = [ ./hw.nix profiles.laptop ];
|
||||||
|
|
@ -16,5 +18,43 @@
|
||||||
networking.interfaces.enp1s0.useDHCP = true;
|
networking.interfaces.enp1s0.useDHCP = true;
|
||||||
networking.interfaces.wlp2s0.useDHCP = true;
|
networking.interfaces.wlp2s0.useDHCP = true;
|
||||||
|
|
||||||
|
katnet.public.interfaces = singleton "wlp2s0";
|
||||||
|
|
||||||
|
katnet.public.tcp.ports = [ 9981 9982 ];
|
||||||
|
|
||||||
|
hardware.firmware = [ pkgs.libreelec-dvb-firmware ];
|
||||||
|
|
||||||
|
services.tvheadend.enable = true;
|
||||||
|
|
||||||
|
systemd.services.tvheadend.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
systemd.services.tvheadend-kat = {
|
||||||
|
description = "Tvheadend TV streaming server";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
script = ''
|
||||||
|
${pkgs.tvheadend}/bin/tvheadend \
|
||||||
|
--http_root /tvheadend \
|
||||||
|
--http_port 9981 \
|
||||||
|
--htsp_port 9982 \
|
||||||
|
-f \
|
||||||
|
-C \
|
||||||
|
-p ${config.users.users.tvheadend.home}/tvheadend.pid \
|
||||||
|
-u tvheadend \
|
||||||
|
-g video
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "forking";
|
||||||
|
PIDFile = "${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 5;
|
||||||
|
User = "tvheadend";
|
||||||
|
Group = "video";
|
||||||
|
|
||||||
|
ExecStop = "${pkgs.coreutils}/bin/rm ${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
system.stateVersion = "20.09";
|
system.stateVersion = "20.09";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ with lib;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
"/tvheadend/".proxyPass = "http://192.168.1.245:9981";
|
||||||
"/" = {
|
"/" = {
|
||||||
root = "/mnt/zraw/media/";
|
root = "/mnt/zraw/media/";
|
||||||
extraConfig = "autoindex on;";
|
extraConfig = "autoindex on;";
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ let
|
||||||
|
|
||||||
obs-studio = super.obs-studio.override { pipewireSupport = true; };
|
obs-studio = super.obs-studio.override { pipewireSupport = true; };
|
||||||
|
|
||||||
|
libreelec-dvb-firmware = self.callPackage ./libreelec-dvb-firmware { };
|
||||||
|
|
||||||
hextorgba =
|
hextorgba =
|
||||||
(import ../lib/colorhelpers.nix { inherit (super) lib; }).hextorgba;
|
(import ../lib/colorhelpers.nix { inherit (super) lib; }).hextorgba;
|
||||||
|
|
||||||
|
|
|
||||||
26
pkgs/libreelec-dvb-firmware/default.nix
Normal file
26
pkgs/libreelec-dvb-firmware/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ stdenv, fetchFromGitHub, lib}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "libreelec-fw-dvb";
|
||||||
|
version = "1.4.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
repo = "dvb-firmware";
|
||||||
|
owner = "LibreElec";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1xnfl4gp6d81gpdp86v5xgcqiqz2nf1i43sb3a4i5jqs8kxcap2k";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildPhase = "";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp -rv firmware $out/lib/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
license = lib.licenses.unfreeRedistributableFirmware;
|
||||||
|
maintainers = with maintainers; [ kittywitch ];
|
||||||
|
platforms = with platforms; linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue