Skip to content

Commit

Permalink
Merge pull request #69 from dhruveshb-mecha/dev-v4
Browse files Browse the repository at this point in the history
fix: alacritty permission issue fix
  • Loading branch information
dhruveshb-mecha authored Jan 4, 2025
2 parents 077d8c4 + 5ffcce5 commit 30e5eb2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions debian/distro/modules/alacritty-config.nu
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export def configure_alacritty [] {
SUDO cp $alacritty_bin $alacritty_dest
log_debug "System binary installation completed successfully."

# Make the binary executable
SUDO chmod 755 $"($alacritty_dest)/alacritty"
log_debug "Alacritty binary permissions set successfully."

# User-level configuration
log_info "Setting up user alacritty configuration..."

Expand Down
20 changes: 11 additions & 9 deletions debian/distro/modules/system-config.nu
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ mechanix-keyboard -s /etc/mechanix/shell/keyboard/settings.yml &"
}

export def set_config_dir_ownership [] {
let config_dir = $"($env.ROOTFS_DIR)/home/mecha/.config"
let config_dir = $"/home/mecha/.config"
log_debug $"Setting ownership of ($config_dir) to mecha:mecha"

let rootfs_dir = $env.ROOTFS_DIR
Expand All @@ -287,7 +287,7 @@ export def set_config_dir_ownership [] {
CHROOT chown -R mecha:mecha $config_dir
log_info "Ownership set successfully."
} catch {
log_error $"Failed to set ownership"
|error| log_error $"Failed to set ownership : ($error)"
}
}

Expand All @@ -303,7 +303,8 @@ export def configure_mecha_system_pref [] {
CHROOT gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
log_info "On-screen keyboard enabled system-wide."
} catch {
log_error "Failed to enable on-screen keyboard system-wide."
|error|
log_error "Failed to enable on-screen keyboard system-wide. "
}

log_debug "Removing unused desktop files"
Expand All @@ -315,14 +316,15 @@ export def configure_mecha_system_pref [] {
"/usr/share/applications/debian-xterm.desktop"
]

for file in $files_to_remove {
let file_path = $"($rootfs_dir)($file)"
if ($file_path | path exists) {
log_debug $"Removing file: ($file_path)"
SUDO rm $file_path
}
for file in $files_to_remove {
let file_path = $"($rootfs_dir)($file)"
if ($file_path | path exists) {
log_debug $"Removing file: ($file_path)"
SUDO rm $file_path
} else {
log_debug "File not found: ($file_path)"
}
}

log_info "System-wide settings configuration completed."
}

0 comments on commit 30e5eb2

Please sign in to comment.