mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
refactor: move homelab config to module
This commit is contained in:
parent
742a55e5a0
commit
e03f3af01d
19 changed files with 123 additions and 62 deletions
27
modules/homelab/plex.nix
Normal file
27
modules/homelab/plex.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
pkgsUnstable,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.fireproof.homelab.enable (let
|
||||
domain = "plex.nickolaj.com";
|
||||
in {
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
http2 = true;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:32400/";
|
||||
};
|
||||
};
|
||||
|
||||
services.plex = {
|
||||
enable = true;
|
||||
package = pkgsUnstable.plex;
|
||||
openFirewall = true;
|
||||
user = "media";
|
||||
group = "media";
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue