File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 4040 description = "The path to the directory where the boot directory is mounted. This can be used for `boot.loader.grub.mirroredBoots`." ;
4141 } ;
4242
43+ passwordFile = lib . mkOption {
44+ type = with lib . types ; nullOr str ;
45+ default = null ;
46+ description = "Path to a password file which contains the password for this partition. If set to null, the user is interactively asked for it." ;
47+ } ;
48+
4349 withBootPlacebo = lib . mkOption {
4450 type = lib . types . bool ;
4551 default = false ;
169175 start = if withBoot then bootPartitionSize else "1MiB" ;
170176 end = "100%" ;
171177 part-type = "primary" ;
172- content = lib . optionalAttrs disk . withLuks {
178+ content = lib . optionalAttrs disk . withLuks ( {
173179 type = "luks" ;
174180 name = luksName ;
175- askPassword = true ;
176181 inherit ( zfs ) content ;
177- } // lib . optionalAttrs ( ! disk . withLuks ) zfs . content ;
182+ } // ( if disk . passwordFile == null then {
183+ askPassword = true ;
184+ } else {
185+ inherit ( disk ) passwordFile ;
186+ } ) ) // lib . optionalAttrs ( ! disk . withLuks ) zfs . content ;
178187 }
179188 ] ;
180189 } ;
You can’t perform that action at this time.
0 commit comments