From 687fc139d3e733d4e34b4a7d428eda5e89e40e1d Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 24 Sep 2024 20:31:23 +0200 Subject: [PATCH] Clean up installer module --- .../modules/desk_os_installation/main.py | 60 ------------------- 1 file changed, 60 deletions(-) diff --git a/packages/calamares-extensions/modules/desk_os_installation/main.py b/packages/calamares-extensions/modules/desk_os_installation/main.py index 6079e70..cbfe5ec 100644 --- a/packages/calamares-extensions/modules/desk_os_installation/main.py +++ b/packages/calamares-extensions/modules/desk_os_installation/main.py @@ -121,10 +121,6 @@ configuration_body = """ user = "@@username@@"; }; - # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 - systemd.services."getty@tty1".enable = false; - systemd.services."autovt@tty1".enable = false; - nixpkgs.config.allowUnfree = true; """ @@ -161,10 +157,6 @@ cfgkeymap = """ }; """ -cfgconsole = """ - console.keyMap = "@@vconsole@@"; -""" - configuration_tail = """ # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions @@ -251,58 +243,6 @@ def run(): catenate(variables, "kblayout", gs.value("keyboardLayout")) catenate(variables, "kbvariant", gs.value("keyboardVariant")) - if (gs.value("keyboardVConsoleKeymap") is not None): - try: - subprocess.check_output(["pkexec", "loadkeys", gs.value( - "keyboardVConsoleKeymap").strip()], stderr=subprocess.STDOUT) - cfg += cfgconsole - catenate(variables, "vconsole", gs.value( - "keyboardVConsoleKeymap").strip()) - except subprocess.CalledProcessError as e: - libcalamares.utils.error("loadkeys: {}".format(e.output)) - libcalamares.utils.error("Setting vconsole keymap to {} will fail, using default".format( - gs.value("keyboardVConsoleKeymap").strip())) - else: - kbdmodelmap = open( - "/run/current-system/sw/share/systemd/kbd-model-map", 'r') - kbd = kbdmodelmap.readlines() - out = [] - for line in kbd: - if line.startswith("#"): - continue - out.append(line.split()) - # Find rows with same layout - find = [] - for row in out: - if gs.value("keyboardLayout") == row[1]: - find.append(row) - if find != []: - vconsole = find[0][0] - else: - vconsole = "" - if gs.value("keyboardVariant") is not None: - variant = gs.value("keyboardVariant") - else: - variant = "-" - # Find rows with same variant - for row in find: - if variant in row[3]: - vconsole = row[0] - break - # If none found set to "us" - if vconsole != "" and vconsole != "us" and vconsole is not None: - try: - subprocess.check_output( - ["pkexec", "loadkeys", vconsole], stderr=subprocess.STDOUT) - cfg += cfgconsole - catenate(variables, "vconsole", vconsole) - except subprocess.CalledProcessError as e: - libcalamares.utils.error("loadkeys: {}".format(e.output)) - libcalamares.utils.error( - "vconsole value: {}".format(vconsole)) - libcalamares.utils.error("Setting vconsole keymap to {} will fail, using default".format( - gs.value("keyboardVConsoleKeymap"))) - if (gs.value("username") is not None): fullname = gs.value("fullname") groups = ["networkmanager", "wheel"]