Don't do that. This is against all security procedures recommended by the manufacturer of the hardware wallet.. It will expose your funds, your seed and defeats the whole purpose of using a hardware wallet.
Ledger company made a guide on how to properly use your ledger nano with electrum wallet, without exposing your seed.
https://support.ledger.com/hc/en-us/articles/115005161925-Set-up-and-use-Electrum