mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Add caffeinate to nix darwin
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
# Common file for both nixos and nix-darwin
|
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./nix/nix.nix
|
./nix/nix.nix
|
||||||
@@ -31,4 +30,14 @@
|
|||||||
};
|
};
|
||||||
info.enable = true;
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user