Files
home-manager/tests/modules/programs/ghostty/systemd-service.nix
Robert Helgesson 4e8b7bef66 ghostty: prevent service restarts
Stopping or restarting the service will destroy open Ghostty sessions,
potentially disrupting work. This change ensures that we leave the
existing service untouched.

Fixes #8485
2026-01-06 23:26:04 +01:00

29 lines
706 B
Nix

{ config, ... }:
{
programs.ghostty = {
enable = true;
package = config.lib.test.mkStubPackage { outPath = null; };
systemd.enable = true;
settings = {
theme = "catppuccin-mocha";
font-size = 10;
};
};
nmt.script = ''
servicePath=home-files/.config/systemd/user/app-com.mitchellh.ghostty.service
serviceOverridesPath=$servicePath.d/overrides.conf
assertFileExists $serviceOverridesPath
assertFileContent $serviceOverridesPath \
${builtins.toFile "ghostty-service-overrides" ''
[Unit]
X-SwitchMethod=keep-old
''}
assertFileContent \
home-files/.config/ghostty/config \
${./example-config-expected}
'';
}