mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
home-media
This commit is contained in:
parent
77f5f15ed3
commit
8a4b539ee2
4 changed files with 77 additions and 33 deletions
|
|
@ -12,6 +12,7 @@ in
|
|||
self.nixosModules.default
|
||||
./configuration.nix
|
||||
(self + /webapps/host.nix)
|
||||
./home-media.nix
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
|
@ -21,39 +22,6 @@ in
|
|||
package = pkgs.netdataCloud;
|
||||
};
|
||||
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
users.users.vinoth = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "jellyfin" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGQAoH/iaojJSIHZmPdxZH+CrI8lKqgWA3tMRFlGI41M vinoth.ratna.kumar@gmail.com"
|
||||
];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
yt-dlp
|
||||
ffmpeg
|
||||
aria2
|
||||
tmux
|
||||
zellij
|
||||
];
|
||||
/*
|
||||
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;
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
programs.nix-ld.enable = true; # for vscode server
|
||||
|
||||
# Workaround the annoying `Failed to start Network Manager Wait Online` error on switch.
|
||||
|
|
|
|||
75
configurations/nixos/pureintent/home-media.nix
Normal file
75
configurations/nixos/pureintent/home-media.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{ flake, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (flake) inputs;
|
||||
inherit (inputs) self;
|
||||
in
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
||||
BIN
secrets/pureintent-basic-auth.age
generated
Normal file
BIN
secrets/pureintent-basic-auth.age
generated
Normal file
Binary file not shown.
|
|
@ -9,4 +9,5 @@ in
|
|||
{
|
||||
"hedgedoc.env.age".publicKeys = users ++ systems;
|
||||
"github-nix-ci/srid.token.age".publicKeys = users ++ systems;
|
||||
"pureintent-basic-auth.age".publicKeys = users ++ systems;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue