mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
modules.services.slurm: set timeLimit as optional
This commit is contained in:
@@ -82,6 +82,7 @@ inputs:
|
||||
{ name = "n2"; gpuIds = [ "a30" ]; }
|
||||
];
|
||||
};
|
||||
timeLimit = "48:00:00";
|
||||
};
|
||||
};
|
||||
packages = { vasp = {}; desktop = {}; lumerical = {}; };
|
||||
|
||||
@@ -44,6 +44,7 @@ inputs:
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
timeLimit = mkOption { type = types.nullOr types.nonEmptyStr; default = null; };
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.services) slurm; in inputs.lib.mkIf slurm.enable (inputs.lib.mkMerge
|
||||
[
|
||||
@@ -103,7 +104,7 @@ inputs:
|
||||
n
|
||||
"Nodes=${builtins.concatStringsSep "," (builtins.map (n: slurm.node.${n}.name) v)}"
|
||||
"Default=${if n == slurm.defaultPartition then "YES" else "NO"}"
|
||||
"MaxTime=48:00:00"
|
||||
"MaxTime=${if slurm.timeLimit != null then slurm.timeLimit else "INFINITE"}"
|
||||
"State=UP"
|
||||
])
|
||||
slurm.partitions;
|
||||
|
||||
Reference in New Issue
Block a user