mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
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
29 lines
706 B
Nix
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}
|
|
'';
|
|
}
|