summary refs log tree commit diff
path: root/nixos/modules/services/misc/leaps.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/misc/leaps.nix')
-rw-r--r--nixos/modules/services/misc/leaps.nix62
1 files changed, 0 insertions, 62 deletions
diff --git a/nixos/modules/services/misc/leaps.nix b/nixos/modules/services/misc/leaps.nix
deleted file mode 100644
index f797218522c..00000000000
--- a/nixos/modules/services/misc/leaps.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
-  cfg = config.services.leaps;
-  stateDir = "/var/lib/leaps/";
-in
-{
-  options = {
-    services.leaps = {
-      enable = mkEnableOption "leaps";
-      port = mkOption {
-        type = types.port;
-        default = 8080;
-        description = "A port where leaps listens for incoming http requests";
-      };
-      address = mkOption {
-        default = "";
-        type = types.str;
-        example = "127.0.0.1";
-        description = "Hostname or IP-address to listen to. By default it will listen on all interfaces.";
-      };
-      path = mkOption {
-        default = "/";
-        type = types.path;
-        description = "Subdirectory used for reverse proxy setups";
-      };
-    };
-  };
-
-  config = mkIf cfg.enable {
-    users = {
-      users.leaps = {
-        uid             = config.ids.uids.leaps;
-        description     = "Leaps server user";
-        group           = "leaps";
-        home            = stateDir;
-        createHome      = true;
-      };
-
-      groups.leaps = {
-        gid = config.ids.gids.leaps;
-      };
-    };
-
-    systemd.services.leaps = {
-      description   = "leaps service";
-      wantedBy      = [ "multi-user.target" ];
-      after         = [ "network.target" ];
-
-      serviceConfig = {
-        User = "leaps";
-        Group = "leaps";
-        Restart = "on-failure";
-        WorkingDirectory = stateDir;
-        PrivateTmp = true;
-        ExecStart = "${pkgs.leaps}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}";
-      };
-    };
-  };
-}