summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/shiori.nix
blob: fd6bc9aadb881f4064d9768b11d232b6d255ea2c (plain)
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
{config, lib, pkgs, ...}:
let
  web_port = 9011;
  statedir = "/var/lib/shiori";
in {
  state = [ statedir ];
  systemd.services.shiori = {
    description = "Shiori Server";
    after = [ "network-online.target" ];
    environment = {
      SHIORI_DIR = statedir;
    };
    wantedBy = [ "multi-user.target" ];
    serviceConfig = {
      DynamicUser = true;
      StateDirectory = "shiori";
      ExecStart = "${pkgs.shiori}/bin/shiori serve -a 127.0.0.1 -p ${toString web_port}";
      PrivateTmp = true;
    };
  };
  services.nginx.virtualHosts."bookmark.euer.krebsco.de" = {
    forceSSL = true;
    enableACME = true;

    locations."/" = {
      proxyPass = "http://127.0.0.1:${toString web_port}/";
    };
  };
}