From 91af5b4a53ee8e57f4178ef58036dce49fbda91a Mon Sep 17 00:00:00 2001 From: Rudolf Vesely Date: Thu, 14 Sep 2023 09:45:18 +0000 Subject: [PATCH] Add extra args into swap. --- lib/types/swap.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/types/swap.nix b/lib/types/swap.nix index 1e8cb9f..e5cfbaa 100644 --- a/lib/types/swap.nix +++ b/lib/types/swap.nix @@ -11,6 +11,11 @@ default = device; description = "Device"; }; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + description = "Extra arguments"; + }; randomEncryption = lib.mkOption { type = lib.types.bool; default = false; @@ -35,7 +40,9 @@ _create = diskoLib.mkCreateOption { inherit config options; default = '' - mkswap ${config.device} + mkswap \ + ${toString config.extraArgs} \ + ${config.device} ''; }; _mount = diskoLib.mkMountOption {