diff --git a/modules/services/window-managers/awesome.nix b/modules/services/window-managers/awesome.nix
index a012a03c..d79e72fe 100644
--- a/modules/services/window-managers/awesome.nix
+++ b/modules/services/window-managers/awesome.nix
@@ -6,7 +6,7 @@ let
 
   cfg = config.xsession.windowManager.awesome;
   awesome = cfg.package;
-  getLuaPath = lib: dir: "${lib}/${dir}/lua/${pkgs.luaPackages.lua.luaversion}";
+  getLuaPath = lib: dir: "${lib}/${dir}/lua/${awesome.lua.luaversion}";
   makeSearchPath = lib.concatMapStrings (path:
     " --search ${getLuaPath path "share"}"
     + " --search ${getLuaPath path "lib"}");