Add caffeinate to nix darwin

This commit is contained in:
2025-09-30 16:35:28 +02:00
parent 3a43ad343b
commit 2523da17f1

View File

@@ -1,4 +1,3 @@
# Common file for both nixos and nix-darwin
{pkgs, ...}: {
imports = [
./nix/nix.nix
@@ -31,4 +30,14 @@
};
info.enable = true;
};
launchd.user.agents.caffeinate = {
command = "${pkgs.darwin.PowerManagement}/bin/caffeinate -diu";
serviceConfig = {
KeepAlive = true;
RunAtLoad = true;
StandardOutPath = "/tmp/caffeinate.log";
StandardErrorPath = "/tmp/caffeinate.err";
};
};
}