mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-09-05 16:47:32 -04:00
Second round of fixes
This commit is contained in:
@@ -27,7 +27,7 @@ func cosmic() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Replace SDDM with cosmic-greeter
|
// Replace SDDM with cosmic-greeter
|
||||||
writeFile("/etc/greetd/config.toml", "[terminal]\nvt = 1\n\n[default_session]\ncommand = \"cosmic-comp /bin/cosmic-greeter\"\nuser = \"cosmic-greeter\"", "root", 0644)
|
writeFile("/etc/greetd/config.toml", "[terminal]\nvt = 1\n\n[default_session]\ncommand = \"cosmic-comp /bin/cosmic-greeter\"\nuser = \"cosmic-greeter\"\n", "root", 0644)
|
||||||
manageService("stop", "sddm.service")
|
manageService("stop", "sddm.service")
|
||||||
manageService("disable", "sddm.service")
|
manageService("disable", "sddm.service")
|
||||||
manageService("enable", "greetd.service")
|
manageService("enable", "greetd.service")
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ func system() {
|
|||||||
doAll = true
|
doAll = true
|
||||||
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\n", "root", 0644)
|
||||||
writeFile("/tmp/PKGBUILD", `pkgname=base-devel
|
writeFile("/tmp/PKGBUILD", `pkgname=base-devel
|
||||||
pkgver=1
|
pkgver=1
|
||||||
pkgrel=2
|
pkgrel=2
|
||||||
@@ -82,7 +82,7 @@ depends=(
|
|||||||
var sysctlConf strings.Builder
|
var sysctlConf strings.Builder
|
||||||
sysctlConf.WriteString("net.ipv6.conf.all.use_tempaddr = 2\nnet.ipv6.conf.default.use_tempaddr = 2")
|
sysctlConf.WriteString("net.ipv6.conf.all.use_tempaddr = 2\nnet.ipv6.conf.default.use_tempaddr = 2")
|
||||||
for _, nic := range nics {
|
for _, nic := range nics {
|
||||||
sysctlConf.WriteString("\nnet.ipv6.conf." + nic.Name() + "use_tempaddr = 2")
|
sysctlConf.WriteString("\nnet.ipv6.conf." + nic.Name() + "use_tempaddr = 2\n")
|
||||||
}
|
}
|
||||||
writeFile("/etc/sysctl.d/40-ipv6-priv-ext.conf", sysctlConf.String(), "root", 0644)
|
writeFile("/etc/sysctl.d/40-ipv6-priv-ext.conf", sysctlConf.String(), "root", 0644)
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ depends=(
|
|||||||
}
|
}
|
||||||
fallthrough
|
fallthrough
|
||||||
case 6:
|
case 6:
|
||||||
writeFile("/etc/sysctl.d/35-sysrq.conf", "kernel.sysrq = 244", "root", 0644)
|
writeFile("/etc/sysctl.d/35-sysrq.conf", "kernel.sysrq = 244\n", "root", 0644)
|
||||||
|
|
||||||
if !doAll {
|
if !doAll {
|
||||||
break
|
break
|
||||||
@@ -143,5 +143,5 @@ func addKernelParams(newParameters []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
parameters = append(parameters, newParameters...)
|
parameters = append(parameters, newParameters...)
|
||||||
writeFile("/boot/loader/entries/linux-cachyos.conf", "title Linux Cachyos\noptions root=UUID=e2ff600b-0202-4620-bed3-54d7a58414f8 "+strings.Join(parameters, " ")+"\nlinux /vmlinuz-linux-cachyos\ninitrd /initramfs-linux-cachyos.img", "root", 0700)
|
writeFile("/boot/loader/entries/linux-cachyos.conf", "title Linux Cachyos\noptions root=UUID=e2ff600b-0202-4620-bed3-54d7a58414f8 "+strings.Join(parameters, " ")+"\nlinux /vmlinuz-linux-cachyos\ninitrd /initramfs-linux-cachyos.img\n", "root", 0700)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ func managePackage(action, targetPackage string) {
|
|||||||
func writeFile(path, data, owner string, perms os.FileMode) {
|
func writeFile(path, data, owner string, perms os.FileMode) {
|
||||||
err := os.WriteFile(path, []byte(data), perms)
|
err := os.WriteFile(path, []byte(data), perms)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
other.PrintError("Failed to write to "+path, 1)
|
other.PrintError("Failed to write to "+path+":"+err.Error(), 1)
|
||||||
}
|
}
|
||||||
if owner != "root" {
|
if owner != "root" {
|
||||||
userInfo, err := user.Lookup(owner)
|
userInfo, err := user.Lookup(owner)
|
||||||
|
|||||||
Reference in New Issue
Block a user