Fix machine-generated Hyprland config never loading

Lua's require() treats dots in the module string as directory
separators, so pcall(require, "conf.d.autostart") resolved to
conf/d/autostart.lua instead of the real conf.d/autostart.lua. The
failure was silently swallowed by pcall, so autostart/locale/nvidia/
terminal configs never took effect on any machine using this repo.
Renamed the generated directory to confd (no dot) and updated the
require calls to match.
This commit is contained in:
2026-07-07 23:26:21 +02:00
parent 7947a628ed
commit cb96dd6159
2 changed files with 10 additions and 8 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ hl.config({
}) })
-- machine-generated by src/install.ts based on chosen packages/detected hardware/locale -- machine-generated by src/install.ts based on chosen packages/detected hardware/locale
pcall(require, "conf.d.autostart") pcall(require, "confd.autostart")
pcall(require, "conf.d.locale") pcall(require, "confd.locale")
pcall(require, "conf.d.nvidia") pcall(require, "confd.nvidia")
pcall(require, "conf.d.terminal") pcall(require, "confd.terminal")
+6 -4
View File
@@ -127,11 +127,13 @@ export function ensureSddmEnabled() {
} }
} }
// Machine-generated Hyprland config lives under ~/.config/hypr/conf.d, sourced from the // Machine-generated Hyprland config lives under ~/.config/hypr/confd, sourced from the
// stowed hyprland.lua via pcall(require, "conf.d.<name>") — never stowed itself, since it // stowed hyprland.lua via pcall(require, "confd.<name>") — never stowed itself, since it
// varies per machine/per install run (chosen packages, detected hardware/locale). // varies per machine/per install run (chosen packages, detected hardware/locale). Named
// "confd" (no dot) rather than "conf.d" because Lua's require() treats dots in the module
// string as directory separators, so "conf.d.<name>" would resolve to conf/d/<name>.lua.
function hyprConfD(): string { function hyprConfD(): string {
return join(homedir(), ".config", "hypr", "conf.d"); return join(homedir(), ".config", "hypr", "confd");
} }
// Only written when install detects an NVIDIA GPU. // Only written when install detects an NVIDIA GPU.