mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:29:40 +00:00
hetzner_benchmark: update {min,max}-free with a formula
This commit is contained in:
parent
c43cd8b595
commit
3acb95f745
1 changed files with 5 additions and 3 deletions
|
|
@ -1,9 +1,11 @@
|
|||
# Protect my system from running out of storage or memory
|
||||
let
|
||||
totalStorage = 500;
|
||||
in
|
||||
{
|
||||
# 500GB Storage
|
||||
nix.settings = {
|
||||
min-free = 50 * 1024 * 1024 * 1024;
|
||||
max-free = 100 * 1024 * 1024 * 1024;
|
||||
min-free = builtins.ceil (totalStorage * 0.2) * 1024 * 1024 * 1024;
|
||||
max-free = builtins.ceil (totalStorage * 0.3) * 1024 * 1024 * 1024;
|
||||
};
|
||||
|
||||
systemd.services.nix-daemon.serviceConfig = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue