Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Fix jade config failing to get saved
Browse files Browse the repository at this point in the history
  • Loading branch information
axtloss authored and Michal committed Sep 6, 2022
1 parent 1bbf60e commit 403d30d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
70 changes: 35 additions & 35 deletions src/classes/install_prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,50 +58,50 @@ def __init__(

def generate_json(self):
prefs = {
'partition': {
'device': self.disk,
'mode': self.partition_mode,
'efi': self.is_efi,
'partitions': self.partitions,
'"partition"': {
'"device"': '"'+self.disk+'"',
'"mode"': '"Auto"',
'"efi"': self.is_efi,
'"partitions"': [],
},
'bootloader': {
'type': self.bootloader_type,
'location': self.bootloader_location
'"bootloader"': {
'"type"': '"'+self.bootloader_type+'"',
'"location"': '"'+self.bootloader_location+'"'
},
'locale': {
'locale': [
self.timezone.locale
'"locale"': {
'"locale"': [
'"'+ self.timezone.locale+'"'
],
'keymap': self.layout.country_shorthand,
'timezone': self.timezone.region+"/"+self.timezone.location
'"keymap"': '"'+self.layout.country_shorthand+'"',
'"timezone"': '"'+self.timezone.region+"/"+self.timezone.location+'"'
},
'networking': {
'hostname': self.hostname,
'ipv6': self.ipv_enabled
'"networking"': {
'"hostname"': '"'+self.hostname+'"',
'"ipv6"': self.ipv_enabled
},
'users': [
'"users"': [
{
'name': self.username,
'password': self.password,
'hasroot': self.enable_sudo,
'shell': 'zsh'
'"name"': '"'+self.username+'"',
'"password"': '"'+self.password+'"',
'"hasroot"': self.enable_sudo,
'"shell"': '"zsh"'
}
],
'rootpass': self.password,
'desktop': self.desktop.lower(),
'timeshift': self.timeshift_enabled,
'extra_packages': [
'ttf-nerd-fonts-symbols-1000-em-mono'
'"rootpass"': '"'+self.password+'"',
'"desktop"': '"'+self.desktop.lower()+'"',
'"timeshift"': self.timeshift_enabled,
'"extra_packages"': [
'"ttf-nerd-fonts-symbols-1000-em-mono"'
],
'flatpak': True,
'zramd': self.zramd_enabled,
'unakite': {
'enable': False,
'root': '/dev/null',
'oldroot': self.disk,
'efidir': '/dev/null',
'bootdev': '/dev/null'
'"flatpak"': True,
'"zramd"': self.zramd_enabled,
'"unakite"': {
'"enable"': False,
'"root"': '"/dev/null"',
'"oldroot"': '"'+self.disk+'"',
'"efidir"': '"/dev/null"',
'"bootdev"': '"/dev/null"'
},
'kernel': 'linux'
'"kernel"': '"linux"'
}
return json.dumps(prefs)
2 changes: 1 addition & 1 deletion src/functions/summary_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def carousel_next(self, widget):
self.window.set_previous_page(None)
self.main_carousel.scroll_to(self.next_page, True)
#(self.window.installer_screen.install())
subprocess.run([shutil.which("bash"), "-c", "bash -- /app/share/jade-gui/jade_gui/scripts/savePrefs.sh '"+self.installprefs.generate_json()+"'"], capture_output=False)
subprocess.run(["bash", "-c", "bash -- /app/share/jade-gui/jade_gui/scripts/savePrefs.sh '"+self.installprefs.generate_json()+"'"], capture_output=False)
RunAsync(self.window.installer_screen.install, callback=self.window.installer_screen.carousel_next)

def initialize(self):
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/bash
flatpak-spawn --host pkexec jade config /tmp/jade.json
flatpak-spawn --host bash -c "echo $1 > /tmp/jade.json"

0 comments on commit 403d30d

Please sign in to comment.