system: enable zram swap for all hosts
Some checks failed
Run nix flake check / flake-check (push) Failing after 12m6s
Some checks failed
Run nix flake check / flake-check (push) Failing after 12m6s
Provides compressed swap in RAM to prevent OOM kills during nixos-rebuild on low-memory VMs (2GB). Removes duplicate zram configs from jelly01 and nix-cache01. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,9 +64,5 @@
|
||||
vault.enable = true;
|
||||
homelab.deploy.enable = true;
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
./configuration.nix
|
||||
../../services/nix-cache
|
||||
../../services/actions-runner
|
||||
./zram.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -12,5 +12,6 @@
|
||||
./pki/root-ca.nix
|
||||
./sshd.nix
|
||||
./vault-secrets.nix
|
||||
./zram.nix
|
||||
];
|
||||
}
|
||||
|
||||
8
system/zram.nix
Normal file
8
system/zram.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
# Compressed swap in RAM
|
||||
#
|
||||
# Provides overflow memory during Nix builds and upgrades.
|
||||
# Prevents OOM kills on low-memory hosts (2GB VMs).
|
||||
{ ... }:
|
||||
{
|
||||
zramSwap.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user