Unverified Commit fdab5fd3 authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-nixos

parents d51ad588 f01be45d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -788,6 +788,9 @@
  "var-stdenv-depsTargetTargetPropagated": [
    "index.html#var-stdenv-depsTargetTargetPropagated"
  ],
  "var-stdenv-strictDeps": [
    "index.html#var-stdenv-strictDeps"
  ],
  "ssec-stdenv-attributes": [
    "index.html#ssec-stdenv-attributes"
  ],
+8 −0
Original line number Diff line number Diff line
@@ -487,6 +487,14 @@ The propagated equivalent of `buildInputs`. This would be called `depsHostTarget

The propagated equivalent of `depsTargetTarget`. This is prefixed for the same reason of alerting potential users.

##### `strictDeps` {#var-stdenv-strictDeps}

When using native compilation, `stdenv` is lenient towards incorrect placement of a dependency into one of the dependency lists described above. That means a dependency needed at runtime often works, even if it is only present in `nativeBuildInputs`. Vice-versa, dependencies containing binaries that need to be executed during the build will work even if they are only listed in `buildInputs`.

While convenient for getting to a package quickly, this behavior can break cross-compilation. Adding `strictDeps = true` as a parameter to `mkDerivation` or any of its language specific wrappers disables this behavior.

The specialized `build*` functions for dlang, emacs, go, nim, ocaml, python, and rust enable this option by default.

## Attributes {#ssec-stdenv-attributes}

### Variables affecting `stdenv` initialisation {#variables-affecting-stdenv-initialisation}
+6 −0
Original line number Diff line number Diff line
@@ -17478,6 +17478,12 @@
    name = "Maciej Krüger";
    keys = [ { fingerprint = "E90C BA34 55B3 6236 740C  038F 0D94 8CE1 9CF4 9C5F"; } ];
  };
  mkleczek = {
    name = "Michal Kleczek";
    email = "michal@kleczek.org";
    github = "mkleczek";
    githubId = 11559480;
  };
  mksafavi = {
    name = "MK Safavi";
    email = "mksafavi@gmail.com";
+2 −0
Original line number Diff line number Diff line
@@ -70,3 +70,5 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
- `services.frp` now supports multiple instances through `services.frp.instances` to make it possible to run multiple frp clients or servers at the same time.

- `services.openssh` now supports generating host SSH keys by setting `services.openssh.generateHostKeys = true` while leaving `services.openssh.enable` disabled.  This is particularly useful for systems that have no need of an SSH daemon but want SSH host keys for other purposes such as using agenix or sops-nix.

- `services.slurm` now supports slurmrestd usage through the `services.slurm.rest` NixOS options.
+180 −98
Original line number Diff line number Diff line
@@ -130,6 +130,45 @@ in
        enable = lib.mkEnableOption "slurm client daemon";
      };

      rest = {
        enable = lib.mkEnableOption "slurm REST daemon";

        options = lib.mkOption {
          type = lib.types.str;
          default = "";
          description = "Extra command-line options to pass to slurmrestd.";
        };

        environment = lib.mkOption {
          default = { };
          description = "Environment variables to set for the slurmrestd daemon, see slurmrestd(8).";
          type = lib.types.submodule {
            freeformType = with lib.types; attrsOf str;
            options = {
              SLURM_JWT = lib.mkOption {
                type = lib.types.str;
                default = "daemon";
                description = "This variable must be set to use JWT token authentication.";
              };
              SLURMRESTD_LISTEN = lib.mkOption {
                type = lib.types.str;
                default = ":6820";
                description = "Comma-delimited list of host:port pairs or unix sockets to listen on.";
              };
              SLURMRESTD_DEBUG = lib.mkOption {
                type = lib.types.str;
                default = "info";
                description = ''
                  Set debug level explicitly. Valid values are 0-9, or the same
                  string values as the debug options such as SlurmctldDebug in
                  slurm.conf(5).
                '';
              };
            };
          };
        };
      };

      enableStools = lib.mkOption {
        type = lib.types.bool;
        default = false;
@@ -359,7 +398,15 @@ in
      '';

    in
    lib.mkIf (cfg.enableStools || cfg.client.enable || cfg.server.enable || cfg.dbdserver.enable) {
    lib.mkIf
      (
        cfg.enableStools
        || cfg.client.enable
        || cfg.server.enable
        || cfg.dbdserver.enable
        || cfg.rest.enable
      )
      {

        environment.systemPackages = [ wrappedSlurm ];

@@ -374,6 +421,14 @@ in

        users.groups.slurm.gid = config.ids.uids.slurm;

        users.users.slurmrestd = lib.mkIf (cfg.rest.enable) {
          name = "slurmrestd";
          group = "slurmrestd";
          isSystemUser = true;
        };

        users.groups.slurmrestd = lib.mkIf (cfg.rest.enable) { };

        systemd.services.slurmd = lib.mkIf (cfg.client.enable) {
          path =
            with pkgs;
@@ -484,6 +539,33 @@ in
            };
          };

        systemd.services.slurmrestd = lib.mkIf (cfg.rest.enable) {
          path = with pkgs; [
            wrappedSlurm
            coreutils
          ];

          wantedBy = [ "multi-user.target" ];
          after = [
            "systemd-tmpfiles-clean.service"
            "network-online.target"
            "remote-fs.target"
            "slurmctld.service"
          ];
          wants = [ "network-online.target" ];

          serviceConfig = {
            Type = "simple";
            ExecStart = "${wrappedSlurm}/bin/slurmrestd ${cfg.rest.options}";
            PIDFile = "/run/slurmrestd.pid";
            ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
            LimitMEMLOCK = "infinity";
            User = "slurmrestd";
            Group = "slurmrestd";
          };

          environment = cfg.rest.environment;
        };
      };

}
Loading