nixos: create 'modules/nixos' folder
Let's consolidate all modules under one path, so that NixOS, home-manager, and nix-darwin (if I ever end up using it down the line) would go under the same folder.
This commit is contained in:
parent
b52e56ed08
commit
c856933803
74 changed files with 1 additions and 1 deletions
39
modules/nixos/services/jellyfin/default.nix
Normal file
39
modules/nixos/services/jellyfin/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# A FLOSS media server
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.services.jellyfin;
|
||||
in
|
||||
{
|
||||
options.my.services.jellyfin = {
|
||||
enable = lib.mkEnableOption "Jellyfin Media Server";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
|
||||
# Set-up media group
|
||||
users.groups.media = { };
|
||||
|
||||
my.services.nginx.virtualHosts = [
|
||||
{
|
||||
subdomain = "jellyfin";
|
||||
port = 8096;
|
||||
extraConfig = {
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
'';
|
||||
};
|
||||
# Too bad for the repetition...
|
||||
locations."/socket" = {
|
||||
proxyPass = "http://127.0.0.1:8096/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue