diff --git a/cosmic.go b/cosmic.go index 5e2495f..2212f65 100644 --- a/cosmic.go +++ b/cosmic.go @@ -27,7 +27,7 @@ func cosmic() { } // 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("disable", "sddm.service") manageService("enable", "greetd.service") diff --git a/system.go b/system.go index 633e29a..e3648f5 100644 --- a/system.go +++ b/system.go @@ -21,7 +21,7 @@ func system() { doAll = true fallthrough 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 pkgver=1 pkgrel=2 @@ -82,7 +82,7 @@ depends=( var sysctlConf strings.Builder sysctlConf.WriteString("net.ipv6.conf.all.use_tempaddr = 2\nnet.ipv6.conf.default.use_tempaddr = 2") 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) @@ -102,7 +102,7 @@ depends=( } fallthrough 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 { break @@ -143,5 +143,5 @@ func addKernelParams(newParameters []string) { } } 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) } diff --git a/utilities.go b/utilities.go index 9122009..45f746e 100644 --- a/utilities.go +++ b/utilities.go @@ -34,7 +34,7 @@ func managePackage(action, targetPackage string) { func writeFile(path, data, owner string, perms os.FileMode) { err := os.WriteFile(path, []byte(data), perms) if err != nil { - other.PrintError("Failed to write to "+path, 1) + other.PrintError("Failed to write to "+path+":"+err.Error(), 1) } if owner != "root" { userInfo, err := user.Lookup(owner)