From 9de22b674fe428895799238d42f57d2eca1ea207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KJ=20=C3=98rbekk?= Date: Tue, 20 Jun 2017 07:28:22 -0400 Subject: systemhttpd: Add missing file. --- config/systemhttpd.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 config/systemhttpd.nix (limited to 'config/systemhttpd.nix') diff --git a/config/systemhttpd.nix b/config/systemhttpd.nix new file mode 100644 index 0000000..dacb7cd --- /dev/null +++ b/config/systemhttpd.nix @@ -0,0 +1,23 @@ +{ configs, lib, pkgs, ... }: +let + port = (import ../data/aliases.nix).services.systemhttpd.port; +in +{ + imports = [ ./orbekk-pkgs.nix ]; + + systemd.services.systemhttpd = { + description = "Web frontend for systemd"; + after = [ "networking.target" ]; + wantedBy = [ "multi-user.target" ]; + environment = { + RUST_BACKTRACE = "1"; + RUST_LOG = "error,systemhttp=info,main=info"; + }; + serviceConfig = { + ExecStart = "${pkgs.systemhttpd}/bin/main --port ${toString port} " + + "--db_file /var/lib/systemhttpd/db.sqlite " + + "--base_url https://kj.orbekk.com/systemd/ serve"; + User = "root"; + }; + }; +} -- cgit v1.2.3