add swap size param
This commit is contained in:
parent
2a9fcd451e
commit
bc70008a90
8
base.nix
8
base.nix
|
@ -19,13 +19,19 @@ in {
|
|||
example = "example@example.com";
|
||||
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 = {
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
priority = 0;
|
||||
size = 1024;
|
||||
size = cfg.swapSize;
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue