Add interface to change LUKS iteration time#3634
Add interface to change LUKS iteration time#3634svartkanin merged 13 commits intoarchlinux:masterfrom
Conversation
| except ValueError: | ||
| return tr('Please enter a valid number') | ||
|
|
||
| try: |
There was a problem hiding this comment.
Is this try block necessary? I don't see similar code in other parts of the codebase.
Some of these imports are already included at the top of the file, too, so I'm not sure why they would fail here.
Torxed
left a comment
There was a problem hiding this comment.
@svartkanin if you're happy with the menu logic, then I'm happy with how this looks.
correctmost
left a comment
There was a problem hiding this comment.
Two comments above and some issues I noticed while testing things locally:
ruff checkandflake8warn about whitespace errors- There seems to be a bug with the error handling:
- Set the iteration time to 10ms
- Press enter to get an "Iteration time must be at least 100ms" error
- Press enter again to get an "Iteration time cannot be empty" error even though 10000 is present in the edit field
| ), | ||
| MenuItem( | ||
| text=tr('Iteration time'), | ||
| action=lambda x: select_iteration_time(x), |
There was a problem hiding this comment.
It looks like the lambda wrapping can be removed:
$ ruff check --preview
archinstall/lib/disk/encryption_menu.py:70:12: PLW0108 Lambda may be unnecessary; consider inlining inner function
|
|
||
| ENC_IDENTIFIER = 'ainst' | ||
|
|
||
| DEFAULT_ITER_TIME = 10000 |
There was a problem hiding this comment.
It might be good to use the new const in archinstall/lib/luks.py too:
archinstall/archinstall/lib/luks.py
Line 79 in a580da2
|
Thanks for the feedback. i haven't tested it locally. because i couldn't get the dev enviroment to work. Edit: i also ran ruff check and flake8 and fixed the spacing warning |
You can try this until the workflows are approved (I don't have approval permissions):
I still see some warnings when running |
|
Ah right, new contributors require runners to be approved! They should be running now :) |
|
@correctmost Thanks soo much. that's very useful. and i got the dev enviroment to work |
There was a problem hiding this comment.
i've been testing for quite a while.
and i found this to solve my issue with input persistancy.
there could be better solutions out there.
but i couldn't get _current_text to persist with the previewed value.
i also tested it in the other inputs and it seems to not effect them.
|
@Torxed i've tested the compiled iso. and it seems to be working as expected. Thanks |

PR Description:
Added a user interface to configure the LUKS encryption iteration time through the interactive menu system.
Why:
I found myself always changing this value after performing archinstall.
because i can't bother to wait 10 seconds for my disk to decrypt.
i would much prefer if its 1-3 seconds.
i know this can be a security issue for some people out there.
so i opted into adding an interface for users to change it instead.
Changes:
Affects:
Default: 10000ms (10 seconds).
Note: This PR follows the existing code patterns and maintains consistency with the current architecture. All changes are properly typed, documented, and include appropriate error handling.
Tests and Checks