I’m trying to use LoadCredential
for a service I’m configuring because it seems like a good idea - unfortunately the current stable systemd version doesn’t support specifying a directory for this setting, so I need to specify it multiple times to pass multiple credentials. I.e.:
systemd.service.name.serviceConfig = {
LoadCredential = "name:/run/secrets/secret1";
LoadCredential = "name:/run/secrets/secret2";
};
This of course gives:
error: attribute 'LoadCredential' already defined at /nix/store/m3c0lbnqhby7as4i8mgd4kzkiccdwp5p-source/configuration/services/name.nix:19:7
at /nix/store/m3c0lbnqhby7as4i8mgd4kzkiccdwp5p-source/configuration/services/name.nix:20:7:
19| LoadCredential = "name:/run/secrets/secret1";
20| LoadCredential = "name:/run/secrets/secret2";
| ^
21|
(use '--show-trace' to show detailed location information)
Is this just impossible with nix? Do I need to write a service file by hand?