summary refs log tree commit diff
path: root/nixos/modules/services/computing/slurm/slurm.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/computing/slurm/slurm.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/computing/slurm/slurm.nix')
-rw-r--r--nixos/modules/services/computing/slurm/slurm.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix
index d2f3feffc97..7686ff99bfc 100644
--- a/nixos/modules/services/computing/slurm/slurm.nix
+++ b/nixos/modules/services/computing/slurm/slurm.nix
@@ -1,10 +1,11 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, options, pkgs, ... }:
 
 with lib;
 
 let
 
   cfg = config.services.slurm;
+  opt = options.services.slurm;
   # configuration file can be generated by http://slurm.schedmd.com/configurator.html
 
   defaultUser = "slurm";
@@ -90,6 +91,7 @@ in
         storageUser = mkOption {
           type = types.str;
           default = cfg.user;
+          defaultText = literalExpression "config.${opt.user}";
           description = ''
             Database user name.
           '';
@@ -154,6 +156,7 @@ in
       controlAddr = mkOption {
         type = types.nullOr types.str;
         default = cfg.controlMachine;
+        defaultText = literalExpression "config.${opt.controlMachine}";
         example = null;
         description = ''
           Name that ControlMachine should be referred to in establishing a
@@ -279,6 +282,10 @@ in
         type = types.path;
         internal = true;
         default = etcSlurm;
+        defaultText = literalDocBook ''
+          Directory created from generated config files and
+          <literal>config.${opt.extraConfigPaths}</literal>.
+        '';
         description = ''
           Path to directory with slurm config files. This option is set by default from the
           Slurm module and is meant to make the Slurm config file available to other modules.