Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/luksroot: GPG Smartcard support for luks encrypted volumes in initrd #60372

Merged
merged 1 commit into from May 12, 2019
Merged

nixos/luksroot: GPG Smartcard support for luks encrypted volumes in initrd #60372

merged 1 commit into from May 12, 2019

Conversation

marenz2569
Copy link
Member

@marenz2569 marenz2569 commented Apr 28, 2019

Motivation for this change

I do want to decrypt my luks volumes with a gpg smart card.
You manually have to encrypt the passphrase for the decryption of luks and specify the gpg encrypted file.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

description = ''
The option to use this LUKS device with a GPG encrypted luks password by the GPG Smartcard.
If null (the default), GPG-Smartcard will be disabled for this device.
Yubikey and GPG Card may not be used at the same time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can't use yubikey and gpg card at the same time, you may want to add an assertion to config.assertions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@artemist I have added the assertion.

@marenz2569 marenz2569 changed the title GPG Smartcard support for luks encrypted volumes in initrd nixos/luksroot: GPG Smartcard support for luks encrypted volumes in initrd May 9, 2019
@FRidh FRidh merged commit 147621f into NixOS:master May 12, 2019
@petrkr
Copy link

petrkr commented May 13, 2019

This PR broken older PR for trezor support, check #60774

}
''}

${if (luks.yubikeySupport && (yubikey != null)) || (luks.gpgSupport && (gpgCard != null)) then ''
Copy link

@petrkr petrkr May 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if there will be 10 or 20 HW ways how to open luks device, this IF will be endless ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants