-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the possibility to enable phoebus in a nixos configuration Add the possibility to edit java_opts
- Loading branch information
Matthieu Daniel-Thomas
committed
Nov 7, 2024
1 parent
6f51365
commit da863ca
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
config, | ||
lib, | ||
epnix, | ||
pkgs, | ||
... | ||
}: let | ||
cfg = config.programs.phoebus-client; | ||
pkg = pkgs.epnix.phoebus.override {java_opts = cfg.java_opts;}; | ||
in { | ||
options.programs.phoebus-client = { | ||
enable = lib.mkEnableOption ''Enable the Phoebus client''; | ||
java_opts = lib.mkOption { | ||
type = lib.types.str; | ||
default = "-XX:MinHeapSize=128m -XX:MaxHeapSize=4g -XX:InitialHeapSize=1g -XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5 -XX:-ShrinkHeapInSteps -XX:NativeMemoryTracking=detail"; | ||
example = "-XX:MinHeapSize=128m -XX:MaxHeapSize=4g -XX:InitialHeapSize=1g"; | ||
description = '' | ||
This wrapper for the `phoebus-unwrapped` executable sets the `JAVA_OPTS` | ||
environment variable with the provided `java_opts` value. | ||
''; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
environment.systemPackages = [pkg]; | ||
}; | ||
} |