nixos/services.bloop: remove with lib;
This commit is contained in:
@@ -1,7 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.services.bloop;
|
cfg = config.services.bloop;
|
||||||
@@ -9,8 +6,8 @@ let
|
|||||||
in {
|
in {
|
||||||
|
|
||||||
options.services.bloop = {
|
options.services.bloop = {
|
||||||
extraOptions = mkOption {
|
extraOptions = lib.mkOption {
|
||||||
type = types.listOf types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [
|
example = [
|
||||||
"-J-Xmx2G"
|
"-J-Xmx2G"
|
||||||
@@ -23,8 +20,8 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
install = mkOption {
|
install = lib.mkOption {
|
||||||
type = types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to install a user service for the Bloop server.
|
Whether to install a user service for the Bloop server.
|
||||||
@@ -35,12 +32,12 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.install) {
|
config = lib.mkIf (cfg.install) {
|
||||||
systemd.user.services.bloop = {
|
systemd.user.services.bloop = {
|
||||||
description = "Bloop Scala build server";
|
description = "Bloop Scala build server";
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
PATH = mkForce "${makeBinPath [ config.programs.java.package ]}";
|
PATH = lib.mkForce "${lib.makeBinPath [ config.programs.java.package ]}";
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
|
|||||||
Reference in New Issue
Block a user