summaryrefslogtreecommitdiff
path: root/config/systemhttpd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/systemhttpd.nix')
-rw-r--r--config/systemhttpd.nix23
1 files changed, 23 insertions, 0 deletions
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";
+ };
+ };
+}