First round of fixes

This commit is contained in:
2025-09-28 02:05:18 -04:00
parent f5408cab0c
commit 8b265cd3d9
4 changed files with 25 additions and 19 deletions
+19 -10
View File
@@ -45,7 +45,7 @@ func configurations() {
} }
fallthrough fallthrough
case 6: case 6:
err := os.Mkdir("/home/"+getUsername()+"/.config/zed", 0755) err := os.MkdirAll("/home/"+getUsername()+"/.config/zed", 0755)
if err != nil { if err != nil {
other.PrintError("Failed to create zed config directory", 1) other.PrintError("Failed to create zed config directory", 1)
} }
@@ -111,7 +111,8 @@ export PROTON_ENABLE_WAYLAND=1
# MISC SETTINGS # MISC SETTINGS
export EDITOR=nvim export EDITOR=nvim
export BUILDDIR=/tmp/makepkg` export BUILDDIR=/tmp/makepkg
`
const zshrc = `# Shell settings const zshrc = `# Shell settings
HISTFILE="$XDG_CACHE_HOME"/zsh-histfile HISTFILE="$XDG_CACHE_HOME"/zsh-histfile
@@ -167,7 +168,8 @@ alias powersave='doas /usr/local/bin/powerset.sh powersave'
alias performance='doas /usr/local/bin/powerset.sh performance' alias performance='doas /usr/local/bin/powerset.sh performance'
alias schedutil='doas /usr/local/bin/powerset.sh schedutil' alias schedutil='doas /usr/local/bin/powerset.sh schedutil'
alias poweroff='doas /usr/bin/poweroff' alias poweroff='doas /usr/bin/poweroff'
alias reboot='doas /usr/bin/reboot'` alias reboot='doas /usr/bin/reboot'
`
const sysinitVim = `" rwinkhart/cachyos-postinstall-helper 09/28/2025 const sysinitVim = `" rwinkhart/cachyos-postinstall-helper 09/28/2025
@@ -232,7 +234,8 @@ endfunction
augroup resCur augroup resCur
autocmd! autocmd!
autocmd BufWinEnter * call ResCur() autocmd BufWinEnter * call ResCur()
augroup END` augroup END
`
const zed = `{ const zed = `{
// rwinkhart/cachyos-postinstall-helper 09/28/2025 // rwinkhart/cachyos-postinstall-helper 09/28/2025
@@ -315,7 +318,8 @@ const zed = `{
"git_panel": { "git_panel": {
"button": false "button": false
} }
}` }
`
const makepkg = `#!/hint/bash const makepkg = `#!/hint/bash
# #
@@ -479,7 +483,8 @@ SRCEXT='.src.tar.gz'
######################################################################### #########################################################################
# #
#-- Command used to run pacman as root, instead of trying sudo and su #-- Command used to run pacman as root, instead of trying sudo and su
PACMAN_AUTH=(doas)` PACMAN_AUTH=(doas)
`
const makepkgRS = `#!/hint/bash const makepkgRS = `#!/hint/bash
# #
@@ -496,7 +501,8 @@ RUSTFLAGS="-Cforce-frame-pointers=yes -C opt-level=3 -C target-cpu=native"
# Additional compiler flags appended to "RUSTFLAGS" for use in debugging. # Additional compiler flags appended to "RUSTFLAGS" for use in debugging.
# Read linkman:rustc[1] for more details on the available flags. # Read linkman:rustc[1] for more details on the available flags.
DEBUG_RUSTFLAGS="-C debuginfo=2"` DEBUG_RUSTFLAGS="-C debuginfo=2"
`
const pacman = `# /etc/pacman.conf - rwinkhart/cachyos-postinstall-helper 09/28/2025 const pacman = `# /etc/pacman.conf - rwinkhart/cachyos-postinstall-helper 09/28/2025
@@ -609,7 +615,8 @@ Include = /etc/pacman.d/mirrorlist
# tips on creating your own repositories. # tips on creating your own repositories.
#[custom] #[custom]
#SigLevel = Optional TrustAll #SigLevel = Optional TrustAll
#Server = file:///home/custompkgs` #Server = file:///home/custompkgs
`
const pacmanHookClean = `[Trigger] const pacmanHookClean = `[Trigger]
Operation = Remove Operation = Remove
@@ -621,7 +628,8 @@ Target = *
[Action] [Action]
Description = Keep the last cache and the currently installed. Description = Keep the last cache and the currently installed.
When = PostTransaction When = PostTransaction
Exec = /usr/bin/paccache -rvk2` Exec = /usr/bin/paccache -rvk2
`
const pacmanHookNvidia = `[Trigger] const pacmanHookNvidia = `[Trigger]
Operation=Install Operation=Install
@@ -636,4 +644,5 @@ Description=Update Nvidia module in initcpio
Depends=mkinitcpio Depends=mkinitcpio
When=PostTransaction When=PostTransaction
NeedsTargets NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'` Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'
`
+2 -2
View File
@@ -28,8 +28,8 @@ func cosmic() {
"Tk" + version + "show_maximize": "false"} "Tk" + version + "show_maximize": "false"}
for key, value := range filenamesToValues { for key, value := range filenamesToValues {
filePath := "/home/" + getUsername() + "/.config/" + key filePath := "/home/" + getUsername() + "/.config/cosmic/com.system76.Cosmic" + key
writeFile(filePath, value, getUsername(), 0755) writeFile(filePath, value+"\n", getUsername(), 0755)
} }
// Replace SDDM with cosmic-greeter // Replace SDDM with cosmic-greeter
+3 -6
View File
@@ -22,10 +22,7 @@ func system() {
fallthrough fallthrough
case 3: case 3:
writeFile("/etc/doas.conf", "permit persist keepenv :wheel as root", "root", 0644) writeFile("/etc/doas.conf", "permit persist keepenv :wheel as root", "root", 0644)
writeFile("/tmp/PKGBUILD", `# Maintainer: Arch Linux Team writeFile("/tmp/PKGBUILD", `pkgname=base-devel
# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
pkgname=base-devel
pkgver=1 pkgver=1
pkgrel=2 pkgrel=2
pkgdesc='Basic tools to build Arch Linux packages' pkgdesc='Basic tools to build Arch Linux packages'
@@ -64,8 +61,8 @@ depends=(
) )
# vim: ts=2 sw=2 et: # vim: ts=2 sw=2 et:
`, "nobody", 0777) `, getUsername(), 0777)
cmd := exec.Command("sudo", "-u", "nobody", "makepkg", "-si", "--dir", "/tmp") cmd := exec.Command("sudo", "-u", getUsername(), "makepkg", "-si", "--dir", "/tmp")
err := cmd.Run() err := cmd.Run()
if err != nil { if err != nil {
other.PrintError("Failed to build+install custom base-devel", 1) other.PrintError("Failed to build+install custom base-devel", 1)
+1 -1
View File
@@ -23,6 +23,6 @@ func universalTweaks() {
if err != nil { if err != nil {
other.PrintError("Failed to create /etc/modprobe.d/blacklist.conf", 1) other.PrintError("Failed to create /etc/modprobe.d/blacklist.conf", 1)
} }
f.WriteString("#Disable kernel watchdog\nblacklist iTCO_wdt") f.WriteString("# Disable kernel watchdog\nblacklist iTCO_wdt")
f.Close() f.Close()
} }