diff options
author | makefu <github@syntax-fehler.de> | 2019-09-24 18:39:03 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2019-09-24 18:41:36 +0200 |
commit | 1f4ae89faf8f6f64f5cef41997d8b5e9fb03efb5 (patch) | |
tree | 1db686fb93805f953392313622820295ef70d1f0 /makefu/2configs | |
parent | 78687ea2a8507de5e3af2a44b71dd47798daf85b (diff) |
ma shiori: init, add to gum
Diffstat (limited to 'makefu/2configs')
-rw-r--r-- | makefu/2configs/shiori.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/makefu/2configs/shiori.nix b/makefu/2configs/shiori.nix new file mode 100644 index 000000000..539d11f87 --- /dev/null +++ b/makefu/2configs/shiori.nix @@ -0,0 +1,24 @@ +{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".locations."/" = { + proxyPass = "http://127.0.0.1:${toString web_port}/"; + }; +} |