Skip to content

Commit

Permalink
chore(alacritty): permission change fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayr-mecha authored Jan 4, 2025
1 parent d7ee5a1 commit a7d29f8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions debian/distro/modules/system-config.nu
Original file line number Diff line number Diff line change
Expand Up @@ -300,26 +300,33 @@ export def set_config_dir_ownership [] {
}

export def set_alacritty_config_dir_ownership [] {
let themes_dir = $"/home/mecha/.alacritty-theme"
let themes_dir = $"/home/mecha/.alacritty-theme"
log_debug $"Setting ownership of ($themes_dir) to mecha:mecha"

let rootfs_dir = $env.ROOTFS_DIR

# Use chroot to execute gsettings command
alias CHROOT = sudo chroot $rootfs_dir

log_debug $"Setting ownership of ($themes_dir) to mecha:mecha"
try {
SUDO chown -R mecha:mecha $themes_dir
CHROOT chown -R mecha:mecha $themes_dir
log_info "Ownership set successfully."
} catch {
|error| log_error $"Failed to set ownership : ($error)"
}

# set permissions to 700
try {
SUDO chmod 700 $themes_dir
CHROOT chmod 700 $themes_dir
log_info "Permissions set successfully."
} catch {
|error| log_error $"Failed to set permissions : ($error)"
}

# migrate alacritty
try {
alacritty migrate
/usr/bin/alacritty migrate
log_info "Permissions set successfully."
} catch {
|error| log_error $"Failed to set permissions : ($error)"
Expand Down

0 comments on commit a7d29f8

Please sign in to comment.