Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/configuration.py
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-12-01 20:27:13 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2022-12-01 20:27:13 +0100
commit26f2ccf943675505b003c12dd308dff347303362 (patch)
tree1ee556558efd3565d45c6666faa152c24e3c4d47 /archinstall/lib/configuration.py
parentb855d44b65a63e457e4d9d91fec98c092169b706 (diff)
parent126f56169d6faacd492b0b0f10c18762cf42a2ba (diff)
Merge branch 'upstreamMaster'
Diffstat (limited to 'archinstall/lib/configuration.py')
-rw-r--r--archinstall/lib/configuration.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/archinstall/lib/configuration.py b/archinstall/lib/configuration.py
index 2a43174d..ad537b21 100644
--- a/archinstall/lib/configuration.py
+++ b/archinstall/lib/configuration.py
@@ -5,15 +5,18 @@ import logging
import pathlib
from typing import Optional, Dict
+from .hsm.fido import Fido2
+from .models.disk_encryption import DiskEncryption
from .storage import storage
from .general import JSON, UNSAFE_JSON
from .output import log
from .exceptions import RequirementError
-from .hsm import get_fido2_devices
+
def configuration_sanity_check():
- if storage['arguments'].get('HSM'):
- if not get_fido2_devices():
+ disk_encryption: DiskEncryption = storage['arguments'].get('disk_encryption')
+ if disk_encryption is not None and disk_encryption.hsm_device:
+ if not Fido2.get_fido2_devices():
raise RequirementError(
f"In order to use HSM to pair with the disk encryption,"
+ f" one needs to be accessible through /dev/hidraw* and support"
@@ -21,6 +24,7 @@ def configuration_sanity_check():
+ f" 'systemd-cryptenroll --fido2-device=list'."
)
+
class ConfigurationOutput:
def __init__(self, config: Dict):
"""
@@ -39,8 +43,8 @@ class ConfigurationOutput:
self._user_creds_file = "user_credentials.json"
self._disk_layout_file = "user_disk_layout.json"
- self._sensitive = ['!users', '!encryption-password']
- self._ignore = ['abort', 'install', 'config', 'creds', 'dry_run']
+ self._sensitive = ['!users']
+ self._ignore = ['abort', 'install', 'config', 'creds', 'dry_run', 'disk_encryption']
self._process_config()