all repos — nixfiles @ c30d730b191174194629857ca82b2957db1c93c8

System and user configuration, managed by nix and home-manager

system/roles/video-library.nix (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  config,
  ...
}:
{
  age.secrets.cifs-jellyfin.file = ../../secrets/cifs-jellyfin.age;

  fileSystems."/srv/video" = {
    device = "//u439959-sub5.your-storagebox.de/u439959-sub5";
    fsType = "smb3";
    options = [
      "x-systemd.automount"
      "noauto"
      "x-systemd.mount-timeout=5s"
      "credentials=${config.age.secrets.cifs-jellyfin.path}"
      "seal"
      "multichannel"
      "forceuid"
      "forcegid"
      "uid=jellyfin"
      "gid=jellyfin"
    ];
  };

  services.jellyfin = {
    enable = true;
  };

  services.caddy.virtualHosts = {
    "jf.${config.networking.domain}" = {
      extraConfig = ''
        reverse_proxy localhost:8096
      '';
    };
  };
}