diff --git a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml index 65c91291d3a9..82e28b913a19 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml @@ -609,6 +609,13 @@ information about the current generation revision + + + The option + services.nomad.extraSettingsPlugins has + been fixed to allow more than one plugin in the path. + + diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 51d1d5e75c10..b01d372c2dcb 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -156,3 +156,5 @@ In addition to numerous new and upgraded packages, this release has the followin - [Xastir](https://xastir.org/index.php/Main_Page) can now access AX.25 interfaces via the `libax25` package. - `nixos-version` now accepts `--configuration-revision` to display more information about the current generation revision + +- The option `services.nomad.extraSettingsPlugins` has been fixed to allow more than one plugin in the path. diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index 890ee0b7d8d1..c6f0624c8ceb 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -67,7 +67,7 @@ in Additional plugins dir used to configure nomad. ''; example = literalExpression '' - [ "" pkgs. ] + [ "" pkgs.nomad-driver-nix pkgs.nomad-driver-podman ] ''; }; @@ -139,9 +139,16 @@ in { DynamicUser = cfg.dropPrivileges; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" + - concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths + - concatMapStrings (path: " -plugin-dir=${path}/bin") cfg.extraSettingsPlugins; + ExecStart = + let + pluginsDir = pkgs.symlinkJoin + { + name = "nomad-plugins"; + paths = cfg.extraSettingsPlugins; + }; + in + "${cfg.package}/bin/nomad agent -config=/etc/nomad.json -plugin-dir=${pluginsDir}/bin" + + concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths; KillMode = "process"; KillSignal = "SIGINT"; LimitNOFILE = 65536;