add config to skip user and locale pages
This commit is contained in:
@@ -59,6 +59,13 @@ minimum_disk_size: 5
|
||||
# Default: yes
|
||||
offer_disk_encryption: yes
|
||||
|
||||
# gnome-initial-setup can handle user and locale setup.
|
||||
# These settings allow to disable these pages.
|
||||
#
|
||||
# Default: skip_user: no, skip_locale: no
|
||||
skip_user: no
|
||||
skip_locale: no
|
||||
|
||||
# List of software that can additionally be selected for installation.
|
||||
# Each packages requires all fields to be set.
|
||||
#
|
||||
|
||||
@@ -49,6 +49,9 @@ def _load_default_config():
|
||||
# disk
|
||||
'minimum_disk_size': 5,
|
||||
'offer_disk_encryption': True,
|
||||
# optional pages
|
||||
'skip_user': False,
|
||||
'skip_locale': False,
|
||||
# software
|
||||
'additional_software': [],
|
||||
# fail
|
||||
|
||||
@@ -41,13 +41,16 @@ class SummaryPage(Gtk.Box, Page):
|
||||
self.software_model, lambda pkg: SoftwareSummaryRow(pkg.name, pkg.icon_path))
|
||||
self.language_row.set_visible(global_state.get_config('fixed_language'))
|
||||
self.software_row.set_visible(global_state.get_config('additional_software'))
|
||||
self.user_row.set_visible(not global_state.get_config('skip_user'))
|
||||
self.format_row.set_visible(not global_state.get_config('skip_locale'))
|
||||
self.timezone_row.set_visible(not global_state.get_config('skip_locale'))
|
||||
|
||||
### callbacks ###
|
||||
|
||||
@Gtk.Template.Callback('continue')
|
||||
def _continue(self, button):
|
||||
installation_scripting.set_ok_to_start_step(Step.configure)
|
||||
global_state.advance(self, allow_return=False, cleanup=True)
|
||||
installation_scripting.set_ok_to_start_step(Step.configure)
|
||||
|
||||
@Gtk.Template.Callback('summary_row_activated')
|
||||
def _summary_row_activated(self, list_box, row):
|
||||
|
||||
@@ -102,10 +102,10 @@ class OsInstallerWindow(Adw.ApplicationWindow):
|
||||
('encrypt', EncryptPage, global_state.get_config('offer_disk_encryption')),
|
||||
('confirm', ConfirmPage, exists('/etc/os-installer/scripts/install.sh')),
|
||||
# configuration section
|
||||
('user', UserPage, True),
|
||||
('locale', LocalePage, True),
|
||||
('format', FormatPage, True),
|
||||
('timezone', TimezonePage, True),
|
||||
('user', UserPage, not global_state.get_config('skip_user')),
|
||||
('locale', LocalePage, not global_state.get_config('skip_locale')),
|
||||
('format', FormatPage, not global_state.get_config('skip_locale')),
|
||||
('timezone', TimezonePage, not global_state.get_config('skip_locale')),
|
||||
('software', SoftwarePage, global_state.get_config('additional_software')),
|
||||
# summary
|
||||
('summary', SummaryPage, True),
|
||||
|
||||
Reference in New Issue
Block a user