summary refs log tree commit diff
path: root/nixos/modules/services/continuous-integration/gocd-agent/default.nix
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2021-12-17 11:14:08 -0500
committerGitHub <noreply@github.com>2021-12-17 11:14:08 -0500
commit06edb74413eb4e4ac56921ef2c038d8f106b15df (patch)
tree897b78ed67fd8ffb0938fc85f52a496ff9785e7c /nixos/modules/services/continuous-integration/gocd-agent/default.nix
parent4edd5c91ca09665e33f705d280a4d9f7f093605f (diff)
parente67a646a925bc3cda86101a3f3afb81db3030ef5 (diff)
downloadnixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.gz
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.bz2
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.lz
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.xz
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.zst
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.zip
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
Diffstat (limited to 'nixos/modules/services/continuous-integration/gocd-agent/default.nix')
-rw-r--r--nixos/modules/services/continuous-integration/gocd-agent/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/services/continuous-integration/gocd-agent/default.nix b/nixos/modules/services/continuous-integration/gocd-agent/default.nix
index acc3fb12484..c63998c6736 100644
--- a/nixos/modules/services/continuous-integration/gocd-agent/default.nix
+++ b/nixos/modules/services/continuous-integration/gocd-agent/default.nix
@@ -1,9 +1,10 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, options, pkgs, ... }:
 
 with lib;
 
 let
   cfg = config.services.gocd-agent;
+  opt = options.services.gocd-agent;
 in {
   options = {
     services.gocd-agent = {
@@ -98,6 +99,15 @@ in {
           "-Dcruise.console.publish.interval=10"
           "-Djava.security.egd=file:/dev/./urandom"
         ];
+        defaultText = literalExpression ''
+          [
+            "-Xms''${config.${opt.initialJavaHeapSize}}"
+            "-Xmx''${config.${opt.maxJavaHeapMemory}}"
+            "-Djava.io.tmpdir=/tmp"
+            "-Dcruise.console.publish.interval=10"
+            "-Djava.security.egd=file:/dev/./urandom"
+          ]
+        '';
         description = ''
           Specifies startup command line arguments to pass to Go.CD agent
           java process.