about summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-06-28 20:42:41 -0400
committerGitHub <noreply@github.com>2018-06-28 20:42:41 -0400
commit50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5 (patch)
treef1740ac944f42e0ff9d28b6198a71ffbc7b7d955 /nixos/modules/services
parentaea65fe7993fb1cefd6dbfc4bca74b4007b8d037 (diff)
parentead58d100d37fad39a915f1c56f5574c2f06018f (diff)
downloadnixlib-50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5.tar
nixlib-50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5.tar.gz
nixlib-50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5.tar.bz2
nixlib-50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5.tar.lz
nixlib-50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5.tar.xz
nixlib-50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5.tar.zst
nixlib-50edf59e1b7e0ab3fccd99d0bc1452cc1f7a7ae5.zip
Merge pull request #41430 from Tomahna/bloop
Bloop: Init 1.0.0-M11
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/development/bloop.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixos/modules/services/development/bloop.nix b/nixos/modules/services/development/bloop.nix
new file mode 100644
index 000000000000..56904b7c40e6
--- /dev/null
+++ b/nixos/modules/services/development/bloop.nix
@@ -0,0 +1,37 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.services.bloop;
+
+in {
+
+  options.services.bloop = {
+    install = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Whether to install a user service for the Bloop server.
+
+        The service must be manually started for each user with
+        "systemctl --user start bloop".
+      '';
+    };
+  };
+
+  config = mkIf (cfg.install) {
+    systemd.user.services.bloop = {
+      description = "Bloop Scala build server";
+
+      serviceConfig = {
+        Type      = "simple";
+        ExecStart = ''${pkgs.bloop}/bin/blp-server'';
+        Restart   = "always";
+      };
+    };
+
+    environment.systemPackages = [ pkgs.bloop ];
+  };
+}