mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
This patch updates all usage of toPlist such that it escapes any strings in the final output. The motication for this change is to avoid confusion when end-users of home-manager's APIs are not aware that the option values they set end up being passed un-escaped to XML files. BREAKING CHANGE: Consumers doing manual escaping will now be doubly escaped. Co-authored-by: Linnnus <linnnus@users.noreply.github.com>
27 lines
690 B
Nix
27 lines
690 B
Nix
{
|
|
config = {
|
|
launchd.agents."test-service" = {
|
|
enable = true;
|
|
config = {
|
|
ProgramArguments = [
|
|
"/some/command"
|
|
"--with-arguments"
|
|
"foo"
|
|
];
|
|
KeepAlive = {
|
|
Crashed = true;
|
|
SuccessfulExit = false;
|
|
};
|
|
ProcessType = "Background";
|
|
UnrecognizedByHomeManager = "should make it to the resulting plist";
|
|
"\"Special\" characters" = "<should be escaped>";
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
serviceFile=LaunchAgents/org.nix-community.home.test-service.plist
|
|
assertFileExists $serviceFile
|
|
assertFileContent $serviceFile ${./expected-agent.plist}
|
|
'';
|
|
};
|
|
}
|