diff options
author | guangtao <gtrunsec@hardenedlinux.org> | 2023-01-18 22:22:43 -0800 |
---|---|---|
committer | guangtao <gtrunsec@hardenedlinux.org> | 2023-01-18 22:22:43 -0800 |
commit | b5a3f795c33ac28c1e403766f1582e117b5c1bd3 (patch) | |
tree | dacff537731825e71a8d3f207e50414e13e72343 | |
parent | a841e262264e48722dccc8469f066068146e406b (diff) | |
download | nixpkgs-b5a3f795c33ac28c1e403766f1582e117b5c1bd3.tar nixpkgs-b5a3f795c33ac28c1e403766f1582e117b5c1bd3.tar.gz nixpkgs-b5a3f795c33ac28c1e403766f1582e117b5c1bd3.tar.bz2 nixpkgs-b5a3f795c33ac28c1e403766f1582e117b5c1bd3.tar.lz nixpkgs-b5a3f795c33ac28c1e403766f1582e117b5c1bd3.tar.xz nixpkgs-b5a3f795c33ac28c1e403766f1582e117b5c1bd3.tar.zst nixpkgs-b5a3f795c33ac28c1e403766f1582e117b5c1bd3.zip |
nixos/nomad: fix multi-plugin-dir path
-rw-r--r-- | nixos/doc/manual/from_md/release-notes/rl-2305.section.xml | 7 | ||||
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2305.section.md | 2 | ||||
-rw-r--r-- | nixos/modules/services/networking/nomad.nix | 15 |
3 files changed, 20 insertions, 4 deletions
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 65c91291d3a..82e28b913a1 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 </para> </listitem> + <listitem> + <para> + The option + <literal>services.nomad.extraSettingsPlugins</literal> has + been fixed to allow more than one plugin in the path. + </para> + </listitem> </itemizedlist> </section> </section> diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 51d1d5e75c1..b01d372c2dc 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 890ee0b7d8d..c6f0624c8ce 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 '' - [ "<pluginDir>" pkgs.<plugins-name> ] + [ "<pluginDir>" 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; |