Use the pod name, not the attribute name
This commit is contained in:
parent
d3eb6a7485
commit
79820a3f9b
2 changed files with 9 additions and 9 deletions
|
|
@ -42,15 +42,15 @@ let
|
|||
};
|
||||
|
||||
createPodScript =
|
||||
name: podDef:
|
||||
podDef:
|
||||
let
|
||||
podDefinitionString = builtins.toJSON { inherit (podDef) ports; };
|
||||
in
|
||||
pkgs.writeScript "manage-pod-${name}.sh" ''
|
||||
pkgs.writeScript "manage-pod-${podDef.name}.sh" ''
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
POD_NAME="${name}"
|
||||
POD_NAME="${podDef.name}"
|
||||
POD_DEFINITION="${podDefinitionString}"
|
||||
|
||||
create_pod() {
|
||||
|
|
@ -108,11 +108,11 @@ in
|
|||
|
||||
podServices = mapAttrs' (
|
||||
name: podDef:
|
||||
nameValuePair "podman-pod-${name}" {
|
||||
description = "Manage Podman pod: ${name}";
|
||||
nameValuePair "podman-pod-${podDef.name}" {
|
||||
description = "Manage Podman pod: ${podDef.name}";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${createPodScript name podDef}";
|
||||
ExecStart = "${createPodScript podDef}";
|
||||
};
|
||||
path = [
|
||||
pkgs.jq
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue