macbook: add warmup service for Zen Browser

Start Zen headless for 3s at login to prime the page cache and shared
libraries on the slow MacBook Air hardware.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-18 17:02:53 +01:00
parent ca6699f6f4
commit 8c1f248fb9

View file

@ -74,6 +74,25 @@
Install.WantedBy = [ "graphical-session.target" ];
};
systemd.user.services.zen-warmup = {
Unit = {
Description = "Pre-warm Zen Browser";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.writeShellScript "zen-warmup" ''
${inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/zen-beta --headless &
ZEN_PID=$!
sleep 3
kill $ZEN_PID 2>/dev/null || true
wait $ZEN_PID 2>/dev/null || true
''}";
};
Install.WantedBy = [ "graphical-session.target" ];
};
systemd.user.services.nemo-warmup = {
Unit = {
Description = "Pre-warm Nemo file manager libraries";