1 { config, lib, pkgs, ... }:
7 cfg = config.services.xserver.windowManager.awesome;
9 getLuaPath = lib: dir: "${lib}/${dir}/lua/${awesome.lua.luaversion}";
10 makeSearchPath = lib.concatMapStrings (path:
11 " --search " + (getLuaPath path "share") +
12 " --search " + (getLuaPath path "lib")
22 services.xserver.windowManager.awesome = {
24 enable = mkEnableOption (lib.mdDoc "Awesome window manager");
26 luaModules = mkOption {
28 type = types.listOf types.package;
29 description = lib.mdDoc "List of lua packages available for being used in the Awesome configuration.";
30 example = literalExpression "[ pkgs.luaPackages.vicious ]";
35 type = types.nullOr types.package;
36 description = lib.mdDoc "Package to use for running the Awesome WM.";
37 apply = pkg: if pkg == null then pkgs.awesome else pkg;
43 description = lib.mdDoc "Disable client transparency support, which can be greatly detrimental to performance in some setups";
52 config = mkIf cfg.enable {
54 services.xserver.windowManager.session = singleton
58 ${awesome}/bin/awesome ${lib.optionalString cfg.noArgb "--no-argb"} ${makeSearchPath cfg.luaModules} &
63 environment.systemPackages = [ awesome ];