diff options
author | Uli Schlachter <psychon@users.noreply.github.com> | 2018-01-02 18:24:56 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2018-01-02 17:24:56 +0000 |
commit | 5465d6f7ded73a815b4ed3953f6d00d0aa563ac3 (patch) | |
tree | 07976f248ef7f15b5a08975fe26b5179b578f2a6 /nixos/modules | |
parent | c98eb9e9b982a33d00bb5ab7da8d646c63912e8e (diff) | |
download | nixlib-5465d6f7ded73a815b4ed3953f6d00d0aa563ac3.tar nixlib-5465d6f7ded73a815b4ed3953f6d00d0aa563ac3.tar.gz nixlib-5465d6f7ded73a815b4ed3953f6d00d0aa563ac3.tar.bz2 nixlib-5465d6f7ded73a815b4ed3953f6d00d0aa563ac3.tar.lz nixlib-5465d6f7ded73a815b4ed3953f6d00d0aa563ac3.tar.xz nixlib-5465d6f7ded73a815b4ed3953f6d00d0aa563ac3.tar.zst nixlib-5465d6f7ded73a815b4ed3953f6d00d0aa563ac3.zip |
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
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/x11/window-managers/awesome.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/window-managers/awesome.nix b/nixos/modules/services/x11/window-managers/awesome.nix index eb97449c6bd9..71eb02ec5954 100644 --- a/nixos/modules/services/x11/window-managers/awesome.nix +++ b/nixos/modules/services/x11/window-managers/awesome.nix @@ -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=$! ''; }; |