Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

80 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 [ "python3" "pkgs" "qtile" ] { };
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 = cfg.package.override {
extraPackages = cfg.extraPackages cfg.package.pythonModule.pkgs;
};
displayManager.sessionPackages = [ cfg.finalPackage ];
};
environment = {
etc."xdg/qtile/config.py" = mkIf (cfg.configFile != null) { source = cfg.configFile; };
systemPackages = [ cfg.finalPackage ];
};
};
}