summaryrefslogtreecommitdiff
path: root/config/systemhttpd.nix
blob: a3587170eebb9e12a4cf3022cd6cb7e47590d20a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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/systemhttpd --port ${toString port} " +
          "--db_file /var/lib/systemhttpd/db.sqlite " +
	  "--base_url https://kj.orbekk.com/systemd/ serve";
      User = "root";
    };
  };
}