1 { config, pkgs, lib, ... }:
6 cfg = config.services.leaps;
7 stateDir = "/var/lib/leaps/";
12 enable = mkEnableOption (lib.mdDoc "leaps");
16 description = lib.mdDoc "A port where leaps listens for incoming http requests";
21 example = "127.0.0.1";
22 description = lib.mdDoc "Hostname or IP-address to listen to. By default it will listen on all interfaces.";
27 description = lib.mdDoc "Subdirectory used for reverse proxy setups";
32 config = mkIf cfg.enable {
35 uid = config.ids.uids.leaps;
36 description = "Leaps server user";
43 gid = config.ids.gids.leaps;
47 systemd.services.leaps = {
48 description = "leaps service";
49 wantedBy = [ "multi-user.target" ];
50 after = [ "network.target" ];
55 Restart = "on-failure";
56 WorkingDirectory = stateDir;
58 ExecStart = "${pkgs.leaps}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}";