awesome: Use --search instead of $LUA_PATH/$LUA_CPATH
Instead of polluting the environment with environment variables which are inherited by processes spawned from awesome, use the command line argument "--search" to add things to the search path. cc #33169
This commit is contained in:
committed by
Franz Pletz
parent
c98eb9e9b9
commit
5465d6f7de
@@ -6,7 +6,11 @@ let
|
||||
|
||||
cfg = config.services.xserver.windowManager.awesome;
|
||||
awesome = cfg.package;
|
||||
inherit (pkgs.luaPackages) getLuaPath getLuaCPath;
|
||||
getLuaPath = lib : dir : "${lib}/${dir}/lua/${pkgs.luaPackages.lua.luaversion}";
|
||||
makeSearchPath = lib.concatMapStrings (path:
|
||||
" --search " + (getLuaPath path "share") +
|
||||
" --search " + (getLuaPath path "lib")
|
||||
);
|
||||
in
|
||||
|
||||
{
|
||||
@@ -46,10 +50,7 @@ in
|
||||
{ name = "awesome";
|
||||
start =
|
||||
''
|
||||
export LUA_CPATH="${lib.concatStringsSep ";" (map getLuaCPath cfg.luaModules)}"
|
||||
export LUA_PATH="${lib.concatStringsSep ";" (map getLuaPath cfg.luaModules)}"
|
||||
|
||||
${awesome}/bin/awesome &
|
||||
${awesome}/bin/awesome ${makeSearchPath cfg.luaModules} &
|
||||
waitPID=$!
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user