index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | profiles/52-54-00-12-34-56.py | 17 | ||||
-rw-r--r-- | profiles/applications/awesome.py | 15 | ||||
-rw-r--r-- | profiles/awesome.py | 34 | ||||
-rw-r--r-- | profiles/gnome.py | 4 | ||||
-rw-r--r-- | profiles/kde.py | 2 | ||||
-rw-r--r-- | profiles/xorg.py | 2 |
diff --git a/profiles/52-54-00-12-34-56.py b/profiles/52-54-00-12-34-56.py index 49b0b966..679c6721 100644 --- a/profiles/52-54-00-12-34-56.py +++ b/profiles/52-54-00-12-34-56.py @@ -4,8 +4,8 @@ import urllib.request import git # Unmount and close previous runs (Mainly only used for re-runs, but won't hurt.) -archinstall.sys_command(f'umount -R /mnt', surpress_errors=True) -archinstall.sys_command(f'cryptsetup close /dev/mapper/luksloop', surpress_errors=True) +archinstall.sys_command(f'umount -R /mnt', suppress_errors=True) +archinstall.sys_command(f'cryptsetup close /dev/mapper/luksloop', suppress_errors=True) # Select a harddrive and a disk password harddrive = archinstall.all_disks()['/dev/sda'] @@ -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 0ec6ec4d..db8f42d7 100644 --- a/profiles/awesome.py +++ b/profiles/awesome.py @@ -1,7 +1,8 @@ -# A desktop environemtn using "Awesome" window manager. +# A desktop environment using "Awesome" window manager. 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 44fd642f..b37679de 100644 --- a/profiles/gnome.py +++ b/profiles/gnome.py @@ -1,4 +1,4 @@ -# A desktop environemtn using "Awesome" window manager. +# A desktop environment using "Gnome" import archinstall @@ -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. diff --git a/profiles/kde.py b/profiles/kde.py index d0afee58..052998bd 100644 --- a/profiles/kde.py +++ b/profiles/kde.py @@ -1,4 +1,4 @@ -# A desktop environemtn using "Awesome" window manager. +# A desktop environement using "KDE". import archinstall, os diff --git a/profiles/xorg.py b/profiles/xorg.py index 1cba7a81..a5820268 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -1,4 +1,4 @@ -# A desktop environemtn using "Awesome" window manager. +# A system with "xorg" installed import archinstall, os |