mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
vanadium/sane-nix: init
Setup memory && storage protection mechanisms
This commit is contained in:
parent
41d9620820
commit
f471cfc438
2 changed files with 14 additions and 0 deletions
13
nix/configurations/vanadium/nixos/sane-nix.nix
Normal file
13
nix/configurations/vanadium/nixos/sane-nix.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Protect my system from running out of storage or memory
|
||||
{
|
||||
nix.settings = {
|
||||
min-free = 50 * 1024 * 1024 * 1024;
|
||||
max-free = 100 * 1024 * 1024 * 1024;
|
||||
};
|
||||
|
||||
systemd.services.nix-daemon.serviceConfig = {
|
||||
MemoryAccounting = true;
|
||||
MemoryMax = "90%";
|
||||
OOMScoreAdjust = 500;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue