index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Varun Madiath <vamega@gmail.com> | 2020-10-19 22:59:30 -0400 |
---|---|---|
committer | Varun Madiath <vamega@gmail.com> | 2020-10-19 23:07:35 -0400 |
commit | 5ded22a5d0f5fb1cf1d4d95945f655e8b6a33896 (patch) | |
tree | 4e2b46493fadf9cf777e9371545a2e93d1510b17 /profiles | |
parent | e4f363ce7dbd6ec27a30123caf262c99452a0dd4 (diff) |
-rw-r--r-- | profiles/52-54-00-12-34-56.py | 13 | ||||
-rw-r--r-- | profiles/applications/awesome.py | 15 | ||||
-rw-r--r-- | profiles/awesome.py | 32 | ||||
-rw-r--r-- | profiles/gnome.py | 2 |
diff --git a/profiles/52-54-00-12-34-56.py b/profiles/52-54-00-12-34-56.py index 2f289c0e..679c6721 100644 --- a/profiles/52-54-00-12-34-56.py +++ b/profiles/52-54-00-12-34-56.py @@ -22,7 +22,11 @@ with archinstall.Filesystem(harddrive, archinstall.GPT) as fs: with archinstall.luks2(harddrive.partition[1], 'luksloop', disk_password) as unlocked_device: unlocked_device.format('btrfs') - with archinstall.Installer(unlocked_device, boot_partition=harddrive.partition[0], hostname='testmachine') as installation: + with archinstall.Installer( + unlocked_device, + boot_partition=harddrive.partition[0], + hostname="testmachine" + ) as installation: if installation.minimal_installation(): installation.add_bootloader() @@ -37,7 +41,12 @@ with archinstall.Filesystem(harddrive, archinstall.GPT) as fs: print(f'Submitting {commit}: success') - conditions = {"project" : "archinstall", "profile" : "52-54-00-12-34-56", "status" : "success", "commit" : commit} + conditions = { + "project": "archinstall", + "profile": "52-54-00-12-34-56", + "status": "success", + "commit": commit + } req = urllib.request.Request("https://api.archlinux.life/build/success", data=json.dumps(conditions).encode('utf8'), headers={'content-type': 'application/json'}) diff --git a/profiles/applications/awesome.py b/profiles/applications/awesome.py index 72945275..c0f0951d 100644 --- a/profiles/applications/awesome.py +++ b/profiles/applications/awesome.py @@ -1,14 +1,19 @@ import archinstall -installation.add_additional_packages("awesome xorg-xrandr xterm feh slock terminus-font-otb gnu-free-fonts ttf-liberation xsel") +installation.add_additional_packages( + "awesome xorg-xrandr xterm feh slock terminus-font-otb gnu-free-fonts ttf-liberation xsel" +) with open(f'{installation.mountpoint}/etc/X11/xinit/xinitrc', 'r') as xinitrc: xinitrc_data = xinitrc.read() for line in xinitrc_data.split('\n'): - if 'twm &' in line: xinitrc_data = xinitrc_data.replace(line, f"# {line}") - if 'xclock' in line: xinitrc_data = xinitrc_data.replace(line, f"# {line}") - if 'xterm' in line: xinitrc_data = xinitrc_data.replace(line, f"# {line}") + if "twm &" in line: + xinitrc_data = xinitrc_data.replace(line, f"# {line}") + if "xclock" in line: + xinitrc_data = xinitrc_data.replace(line, f"# {line}") + if "xterm" in line: + xinitrc_data = xinitrc_data.replace(line, f"# {line}") xinitrc_data += '\n' xinitrc_data += 'exec awesome\n' @@ -22,4 +27,4 @@ with open(f'{installation.mountpoint}/etc/xdg/awesome/rc.lua', 'r') as awesome_r awesome = awesome.replace('xterm', 'xterm -ls -xrm \\"XTerm*selectToClipboard: true\\"') with open(f'{installation.mountpoint}/etc/xdg/awesome/rc.lua', 'w') as awesome_rc_lua: - awesome_rc_lua.write(awesome)
\ No newline at end of file + awesome_rc_lua.write(awesome) diff --git a/profiles/awesome.py b/profiles/awesome.py index 0a695344..db8f42d7 100644 --- a/profiles/awesome.py +++ b/profiles/awesome.py @@ -2,6 +2,7 @@ import archinstall + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -18,6 +19,7 @@ def _prep_function(*args, **kwargs): else: print('Deprecated (??): xorg profile has no _prep_function() anymore') + # Ensures that this code only gets executed if executed # through importlib.util.spec_from_file_location("awesome", "/somewhere/awesome.py") # or through conventional import awesome @@ -32,17 +34,19 @@ if __name__ == 'awesome': # Then setup and configure the desktop environment: awesome arguments = { #'keyboard_layout' : 'sv-latin1', - "editor" : "nano", - "mediaplayer" : "lollypop gstreamer gst-plugins-good gnome-keyring", - "filebrowser" : "nemo gpicview-gtk3", - "webbrowser" : "chromium", - "window_manager" : "awesome", - "virtulization" : "qemu ovmf", - "utils" : "openssh sshfs git htop pkgfile scrot dhclient wget smbclient cifs-utils libu2f-host", - "audio" : "pulseaudio pulseaudio-alsa pavucontrol" + "editor": "nano", + "mediaplayer": "lollypop gstreamer gst-plugins-good gnome-keyring", + "filebrowser": "nemo gpicview-gtk3", + "webbrowser": "chromium", + "window_manager": "awesome", + "virtulization": "qemu ovmf", + "utils": "openssh sshfs git htop pkgfile scrot dhclient wget smbclient cifs-utils libu2f-host", + "audio": "pulseaudio pulseaudio-alsa pavucontrol" } - installation.add_additional_packages("{webbrowser} {utils} {mediaplayer} {window_manager} {virtulization} {filebrowser} {editor}".format(**arguments)) + installation.add_additional_packages( + "{webbrowser} {utils} {mediaplayer} {window_manager} {virtulization} {filebrowser} {editor}".format( + **arguments)) #with open(f'{installation.mountpoint}/etc/X11/xinit/xinitrc', 'a') as X11: # X11.write('setxkbmap se\n') @@ -56,7 +60,10 @@ if __name__ == 'awesome': awesome_lua = awesome_rc_lua.read() # Insert slock as a shortcut on Modkey+l (window+l) - awesome_lua = awesome_lua.replace('\nglobalkeys = gears.table.join(', 'globalkeys = gears.table.join(\n awful.key({ modkey, }, \"l\", function() awful.spawn(\"slock &\") end,\n') + awesome_lua = awesome_lua.replace( + "\nglobalkeys = gears.table.join(", + "globalkeys = gears.table.join(\n awful.key({ modkey, }, \"l\", function() awful.spawn(\"slock &\") end,\n" + ) # Insert some useful applications: #awesome = awesome.replace('{ "open terminal", terminal, ','{ "Chromium", "chromium" },\n "open terminal", terminal, ') @@ -75,5 +82,6 @@ if __name__ == 'awesome': awesome_rc_lua.write(awesome_lua) # Remove some interfering nemo settings - installation.arch_chroot('gsettings set org.nemo.desktop show-desktop-icons false') - installation.arch_chroot('xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search')
\ No newline at end of file + installation.arch_chroot("gsettings set org.nemo.desktop show-desktop-icons false") + installation.arch_chroot( + "xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search") diff --git a/profiles/gnome.py b/profiles/gnome.py index 62519264..b37679de 100644 --- a/profiles/gnome.py +++ b/profiles/gnome.py @@ -32,4 +32,4 @@ if __name__ == 'gnome': installation.enable_service('gdm') # Gnome Display Manager # We could also start it via xinitrc since we do have Xorg, - # but for gnome that's deprecated and wayland is preferred.
\ No newline at end of file + # but for gnome that's deprecated and wayland is preferred. |