Add extra args into swap.

This commit is contained in:
Rudolf Vesely 2023-09-14 09:45:18 +00:00 committed by mergify[bot]
parent 6133a16d68
commit 91af5b4a53

View file

@ -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 {