1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-23 01:41:05 +03:00
nixpkgs/nixos/modules/services/x11/window-managers/qtile.nix
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00

79 lines
1.9 KiB
Nix

{
config,
pkgs,
lib,
...
}:
with lib;
let
cfg = config.services.xserver.windowManager.qtile;
in
{
imports = [
(mkRemovedOptionModule [
"services"
"xserver"
"windowManager"
"qtile"
"backend"
] "The qtile package now provides separate display sessions for both X11 and Wayland.")
];
options.services.xserver.windowManager.qtile = {
enable = mkEnableOption "qtile";
package = mkPackageOption pkgs "qtile-unwrapped" { };
configFile = mkOption {
type = with types; nullOr path;
default = null;
example = literalExpression "./your_config.py";
description = ''
Path to the qtile configuration file.
If null, $XDG_CONFIG_HOME/qtile/config.py will be used.
'';
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = _: [ ];
defaultText = literalExpression ''
python3Packages: with python3Packages; [];
'';
description = ''
Extra Python packages available to Qtile.
An example would be to include `python3Packages.qtile-extras`
for additional unofficial widgets.
'';
example = literalExpression ''
python3Packages: with python3Packages; [
qtile-extras
];
'';
};
finalPackage = mkOption {
type = types.package;
visible = false;
readOnly = true;
description = "The resulting Qtile package, bundled with extra packages";
};
};
config = mkIf cfg.enable {
services = {
xserver.windowManager.qtile.finalPackage = pkgs.python3.pkgs.qtile.override {
extraPackages = cfg.extraPackages pkgs.python3.pkgs;
};
displayManager.sessionPackages = [ cfg.finalPackage ];
};
environment = {
etc."xdg/qtile/config.py" = mkIf (cfg.configFile != null) { source = cfg.configFile; };
systemPackages = [ cfg.finalPackage ];
};
};
}