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:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-11-11 19:40:05 +1100
committerGitHub <noreply@github.com>2022-11-11 09:40:05 +0100
commitc3862c5779194f5e93f9fd2518bb15706c93ad2b (patch)
treed369d5c9dbec14432e3ed42bf872f4b4e021278c /archinstall/lib/configuration.py
parentee1eea21307586c749c2734cff6440ff8f1c2806 (diff)
New encryption menu (#1520)
* New encryption menu Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com> Co-authored-by: Anton Hvornum <anton@hvornum.se>
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..ce782f6c 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.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()