modules: add darwin/nixos builder

This commit is contained in:
zowoq 2023-09-07 12:47:33 +10:00
parent 75bc5ca2c0
commit 820fdb8fd1
11 changed files with 32 additions and 1 deletions
modules/shared

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
let
asGB = size: toString (size * 1024 * 1024 * 1024);
in
{
nix.gc.options = ''
--max-freed "$((${asGB 50} * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"
'';
}