anchor.diff:      fi
   
       # open luksRoot and scan for logical volumes
  -    cryptsetup luksOpen ${device} ${name}
  +    cryptsetup luksOpen ${device} ${name} ${optionalString allowDiscards "--allow-discards"}
     '';
   
     isPreLVM = f: f.preLVM;
  
positive.code:           type = types.bool;
            description = "Whether the luksOpen will be attempted before LVM scan or after it.";
          };
        };
      };
    };
  
negative.code: let
    luks = config.boot.initrd.luks;
  
    openCommand = { name, device, allowDiscards, ... }: ''
      # Wait for luksRoot to appear, e.g. if on a usb drive.
      # XXX: copied and adapted from stage-1-init.sh - should be
      # available as a function.
  