Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot coerce a set to a string at nixos/modules/system/boot/systemd-lib.nix:65:8 #23921

Closed
danbst opened this issue Mar 15, 2017 · 4 comments
Closed

Comments

@danbst
Copy link
Contributor

danbst commented Mar 15, 2017

Issue description

Got error:

cannot coerce a set to a string at .../nixos/modules/system/boot/systemd-lib.nix:65:8

when trying to override serviceConfig.Type attribute:

systemd.services.tomcat.serviceConfig.Type = lib.mkForce "forking";

Inspecting source shows that some warning occured and warning generation crashed.
Inspecting the warning shows that "Systemd ${group} field ${name} cannot have value ${attr.${name}}.";
But "forking" is a normal service type.

Looks like mkForce cannot be used here, which is very unintuitive.

Technical details

  • System: 17.03, was on 16.09 and 16.03 too
@copumpkin
Copy link
Member

I'm guessing this is because serviceConfig isn't a submodule in the current systemd module, which prevents us from using module-like machinery like mkForce in it (as well as not giving us merge behavior and other niceties). Would be nice to convert it into a submodule...

@jb55
Copy link
Contributor

jb55 commented Apr 22, 2017

I just hit this today when trying to override openvpn's serviceConfig.Type. Overriding ExecStart seemed to work though. As a workaround I had to mkForce on the entire serviceConfig.

@mmahut
Copy link
Member

mmahut commented Aug 18, 2019

Any news on this issue?

@danbst
Copy link
Contributor Author

danbst commented Aug 18, 2019

should be fixed with #41446

@danbst danbst closed this as completed Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants