iscsi root initiator: allow specifying arbitrary iscsi commands too

Changed files
+9
nixos
modules
services
networking
+9
nixos/modules/services/networking/iscsi/root-initiator.nix
···
default = false;
};
+
extraIscsiCommands = mkOption {
+
description = "Extra iscsi commands to run in the initrd.";
+
default = "";
+
type = lines;
+
};
+
extraConfig = mkOption {
description = "Extra lines to append to /etc/iscsid.conf";
default = null;
···
'' else ''
iscsiadm --mode node --targetname ${escapeShellArg cfg.target} --login
''}
+
+
${cfg.extraIscsiCommands}
+
pkill -9 iscsid
'';
};