From bc70008a902bb3f79d623cd32a35a3ea173f7272 Mon Sep 17 00:00:00 2001 From: Histausse Date: Sun, 7 May 2023 00:11:45 +0200 Subject: [PATCH] add swap size param --- base.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/base.nix b/base.nix index 398075e..d34597e 100644 --- a/base.nix +++ b/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; } ];