mirror of
https://github.com/nix-community/home-manager.git
synced 2026-12-06 04:40:17 +00:00
Standalone agents cannot rely on shell environment variables or Home Manager updating a system-wide certificate bundle. Prefer the system bundle and use cacert from Home Manager's Nixpkgs input only when that path is missing, without modifying system certificates. Use a small native stat predicate to distinguish ENOENT from permission and path errors. Preserve explicit certificate variables, including empty values, and leave nix-darwin's configured bundle selection unchanged. Cover the absence predicate and update affected launchd fixtures for the shared command change.
36 lines
706 B
Nix
36 lines
706 B
Nix
{
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
test.stubs.t3code = { };
|
|
|
|
programs.t3code = {
|
|
enable = true;
|
|
|
|
server = {
|
|
enable = true;
|
|
extraArgs = [
|
|
"--host"
|
|
"0.0.0.0"
|
|
"--port"
|
|
"3773"
|
|
];
|
|
};
|
|
};
|
|
|
|
nmt.script =
|
|
if pkgs.stdenv.hostPlatform.isDarwin then
|
|
''
|
|
serviceFile=LaunchAgents/org.nix-community.home.t3code.plist
|
|
assertFileExists "$serviceFile"
|
|
assertFileContent "$(normalizeStorePaths "$serviceFile")" ${./server.plist}
|
|
''
|
|
else
|
|
''
|
|
serviceFile=home-files/.config/systemd/user/t3code.service
|
|
assertFileExists "$serviceFile"
|
|
assertFileContent "$serviceFile" ${./server.service}
|
|
'';
|
|
}
|