home-media: all local

This commit is contained in:
Sridhar Ratnakumar 2025-01-10 15:59:55 -05:00
parent 798512c1fd
commit 9aec9d2a3d
4 changed files with 75 additions and 19 deletions

View file

@ -11,8 +11,6 @@ in
imports = [
self.nixosModules.default
./configuration.nix
(self + /webapps/host.nix)
./home-media.nix
];
services.openssh.enable = true;
@ -21,12 +19,6 @@ in
enable = true;
package = pkgs.netdataCloud;
};
services.syncthing = rec {
enable = true;
user = flake.config.me.username;
dataDir = "/home/${user}/.syncthing";
guiAddress = "100.113.68.55:8384";
};
programs.nix-ld.enable = true; # for vscode server

View file

@ -1,13 +1,9 @@
{ flake, config, pkgs, ... }:
{ pkgs, ... }:
let
inherit (flake) inputs;
inherit (inputs) self;
in
{
services.jellyfin = {
enable = true;
openFirewall = true;
# openFirewall = true;
};
environment.systemPackages = with pkgs; [
yt-dlp
@ -15,6 +11,7 @@ in
aria2
tmux
zellij
vlc
];
/* Not using this

View file

@ -9,6 +9,7 @@ in
self.nixosModules.default
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen4
./configuration.nix
./home-media.nix
(self + /modules/nixos/linux/distributed-build.nix)
(self + /modules/nixos/linux/gui/logseq.nix)
(self + /modules/nixos/linux/gui/hyprland)
@ -24,11 +25,6 @@ in
services.openssh.enable = true;
services.tailscale.enable = true;
# services.fprintd.enable = true; -- bad UX
services.syncthing = rec {
enable = true;
user = flake.config.me.username;
dataDir = "/home/${user}/.syncthing";
};
programs.nix-ld.enable = true; # for vscode server
programs.steam.enable = true;

View file

@ -0,0 +1,71 @@
{ pkgs, ... }:
{
services.jellyfin = {
enable = true;
# openFirewall = true;
};
environment.systemPackages = with pkgs; [
yt-dlp
ffmpeg
aria2
tmux
zellij
];
/* Not using this
services.transmission = {
enable = true;
group = "jellyfin";
openRPCPort = true;
settings = {
rpc-bind-address = "localhost";
rpc-whitelist-enabled = false; # ACL managed through Tailscale
rpc-host-whitelist = "pureintent pureintent.rooster-blues.ts.net";
download-dir = "/Self/Downloads";
trash-original-torrent-files = true;
};
};
*/
/* Disabled, because jellyfin has issues
age.secrets = {
"pureintent-basic-auth.age" = {
file = self + /secrets/pureintent-basic-auth.age;
owner = "nginx";
};
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
# virtualHosts."pureintent.rooster-blues.ts.net" = {
virtualHosts = rec {
"pureintent.rooster-blues.ts.net" = pureintent;
"pureintent" = {
locations = {
# Return index.html with likns to other two sites
"/" = {
extraConfig = ''
default_type text/html;
'';
return = "200 '<ul style=\"font-size: 4em;\"><li><a href=\"/web\">Jellyfin</a> (Watch Movies)</li><li><a href=\"/transmission\">Transmission</a> (Torrent Download)</li></ul>'";
};
# Transmission
"/transmission" = {
proxyPass = "http://localhost:9091/transmission";
proxyWebsockets = true;
# transmission has no login page, so use basic auth
basicAuthFile = config.age.secrets."pureintent-basic-auth.age".path;
};
# Jellyfin
"/web" = {
proxyPass = "http://localhost:8096";
proxyWebsockets = true;
};
};
};
};
};
*/
}