diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix index 314cc3f61ecc..25df5030162c 100644 --- a/nixos/modules/services/computing/slurm/slurm.nix +++ b/nixos/modules/services/computing/slurm/slurm.nix @@ -32,12 +32,20 @@ in services.slurm = { server = { - enable = mkEnableOption "slurm control daemon"; - + enable = mkOption { + type = types.bool; + default = false; + description = '' + Wether to enable the slurm control daemon. + Note that the standard authentication method is "munge". + The "munge" service needs to be provided with a password file in order for + slurm to work properly (see services.munge.password). + ''; + }; }; client = { - enable = mkEnableOption "slurm rlient daemon"; + enable = mkEnableOption "slurm client daemon"; }; @@ -161,6 +169,8 @@ in environment.systemPackages = [ wrappedSlurm ]; + services.munge.enable = mkDefault true; + systemd.services.slurmd = mkIf (cfg.client.enable) { path = with pkgs; [ wrappedSlurm coreutils ] ++ lib.optional cfg.enableSrunX11 slurm-spank-x11; diff --git a/nixos/tests/slurm.nix b/nixos/tests/slurm.nix index 0dd00dfb04c2..dc4f62af5640 100644 --- a/nixos/tests/slurm.nix +++ b/nixos/tests/slurm.nix @@ -20,7 +20,6 @@ in { # TODO slrumd port and slurmctld port should be configurations and # automatically allowed by the firewall. networking.firewall.enable = false; - services.munge.enable = true; services.slurm = slurmconfig; }; in { @@ -28,7 +27,6 @@ in { { config, pkgs, ...}: { networking.firewall.enable = false; - services.munge.enable = true; services.slurm = { server.enable = true; } // slurmconfig;