1 { config, pkgs, lib, ... }:
6 cfg = config.services.xserver.windowManager.qtile;
11 (mkRemovedOptionModule [ "services" "xserver" "windowManager" "qtile" "backend" ] "The qtile package now provides separate display sessions for both X11 and Wayland.")
14 options.services.xserver.windowManager.qtile = {
15 enable = mkEnableOption "qtile";
17 package = mkPackageOption pkgs "qtile-unwrapped" { };
19 configFile = mkOption {
20 type = with types; nullOr path;
22 example = literalExpression "./your_config.py";
24 Path to the qtile configuration file.
25 If null, $XDG_CONFIG_HOME/qtile/config.py will be used.
29 extraPackages = mkOption {
30 type = types.functionTo (types.listOf types.package);
32 defaultText = literalExpression ''
33 python3Packages: with python3Packages; [];
36 Extra Python packages available to Qtile.
37 An example would be to include `python3Packages.qtile-extras`
38 for additional unofficial widgets.
40 example = literalExpression ''
41 python3Packages: with python3Packages; [
47 finalPackage = mkOption {
51 description = "The resulting Qtile package, bundled with extra packages";
55 config = mkIf cfg.enable {
57 xserver.windowManager.qtile.finalPackage = pkgs.python3.pkgs.qtile.override { extraPackages = cfg.extraPackages pkgs.python3.pkgs; };
58 displayManager.sessionPackages = [ cfg.finalPackage ];
62 etc."xdg/qtile/config.py" = mkIf (cfg.configFile != null) { source = cfg.configFile; };
63 systemPackages = [ cfg.finalPackage ];