modules/darwin: add apfs-cleanup
This commit is contained in:
parent
134882a2b4
commit
a3a90bc0ae
2 changed files with 22 additions and 0 deletions
modules/darwin/common
21
modules/darwin/common/apfs-cleanup.nix
Normal file
21
modules/darwin/common/apfs-cleanup.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
# https://github.com/NixOS/nixos-org-configurations/blob/71b3de5d1332eeb8fcb05549f4349a433c6935b7/macs/nix-darwin.nix#L79
|
||||
# https://github.com/ofborg/infrastructure/blob/188e976eb38bb9c5a27b94675555c5b534e76bc8/flake.nix#L26
|
||||
launchd.daemons.apfs-cleanup = {
|
||||
# for whatever reason, rosetta keeps garbage around until we run this command
|
||||
script = ''
|
||||
date
|
||||
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -P -minsize 0 /System/Volumes/Data
|
||||
'';
|
||||
serviceConfig = {
|
||||
StartCalendarInterval = [
|
||||
{
|
||||
Hour = 2;
|
||||
Minute = 30;
|
||||
}
|
||||
];
|
||||
StandardErrorPath = "/var/log/apfs-cleanup.log";
|
||||
StandardOutPath = "/var/log/apfs-cleanup.log";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./apfs-cleanup.nix
|
||||
./flake-inputs.nix
|
||||
./reboot.nix
|
||||
./telegraf.nix
|
||||
|
|
Loading…
Add table
Reference in a new issue