anchor.diff:          ''}
       }
   
  -    ${if luks.yubikeySupport && (yubikey != null) then ''
  +    ${optionalString (luks.yubikeySupport && (yubikey != null)) ''
       # Yubikey
       rbtohex() {
           ( od -An -vtx1 | tr -d ' \n' )
  
positive.code:       }));
      };
  
      boot.initrd.luks.yubikeySupport = mkOption {
        default = false;
        type = types.bool;
  
negative.code:         fi
          return 0
      }
  
      wait_gpgcard() {
          local secs="''${1:-10}"
  
          gpg --card-status > /dev/null 2> /dev/null
          if [ $? != 0 ]; then
              echo -n "Waiting $secs seconds for GPG Card to appear"
              local success=false
              for try in $(seq $secs); do
                  echo -n .
                  sleep 1
                  gpg --card-status > /dev/null 2> /dev/null
                  if [ $? == 0 ]; then
                      success=true
                      break
                  fi
              done
              if [ $success == true ]; then
                  echo " - success";
                  return 0
              else
                  echo " - failure";
                  return 1
              fi
          fi
          return 0
      }
    '';
  
    preCommands = ''
  