Merge pull request #2091 from calamares/issue-2090

Allow overriding greetd user/group
This commit is contained in:
demmm 2023-02-13 11:00:11 +01:00 committed by GitHub
commit a5ae67f93c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View File

@ -59,3 +59,11 @@ basicSetup: false
# *displaymanagers* list (as the only one).
#
sysconfigSetup: false
# Some DMs have specific settings. These can be customized here.
#
# greetd has configurable user and group; the user and group is created if it
# does not exist, and the user is set as default-session user.
greetd:
greeter_user: "tom_bombadil"
greeter_group: "wheel"

View File

@ -20,3 +20,10 @@ properties:
required: [ executable, desktopFile ]
basicSetup: { type: boolean, default: false }
sysconfigSetup: { type: boolean, default: false }
greetd:
type: object
properties:
greeter_user: { type: string }
greeter_group: { type: string }
additionalProperties: false

View File

@ -983,6 +983,11 @@ def run():
# Do the actual configuration and collect messages
dm_setup_message = []
for dm in dm_impl:
dm_specific_configuration = libcalamares.job.configuration.get(dm.name, None)
if dm_specific_configuration and isinstance(dm_specific_configuration, dict):
for k, v in dm_specific_configuration.items():
if hasattr(dm, k):
setattr(dm, k, v)
dm_message = None
if enable_basic_setup:
dm_message = dm.basic_setup()