diff --git a/modules/config/swap.nix b/modules/config/swap.nix index f0a6ceeda81..163de568d0f 100644 --- a/modules/config/swap.nix +++ b/modules/config/swap.nix @@ -47,10 +47,13 @@ with pkgs.lib; size = mkOption { default = null; - example = "swap"; + example = 2048; type = types.nullOr types.int; description = '' - Label of the device. Can be used instead of device. + If this option is set, ‘device’ is interpreted as the + path of a swapfile that will be created automatically + with the indicated size (in megabytes) if it doesn't + exist. ''; };