diff --git a/modules/cli/darwin.nix b/modules/cli/darwin.nix index 47f7af5..300cd76 100644 --- a/modules/cli/darwin.nix +++ b/modules/cli/darwin.nix @@ -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"; + }; + }; }