add swap size param

This commit is contained in:
Histausse 2023-05-07 00:11:45 +02:00
parent 2a9fcd451e
commit bc70008a90

View file

@ -19,13 +19,19 @@ in {
example = "example@example.com"; example = "example@example.com";
description = "Email of the admin, use for ACME and stuff"; description = "Email of the admin, use for ACME and stuff";
}; };
swapSize = mkOption {
type = types.int;
default = 1024;
example = 2048;
description = "Size of the swap file";
};
}; };
config = { config = {
swapDevices = [ swapDevices = [
{ {
device = "/swapfile"; device = "/swapfile";
priority = 0; priority = 0;
size = 1024; size = cfg.swapSize;
} }
]; ];