2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.xserver.windowManager.qtile;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2022-04-15 01:41:22 +00:00
|
|
|
options.services.xserver.windowManager.qtile = {
|
|
|
|
enable = mkEnableOption "qtile";
|
|
|
|
|
|
|
|
package = mkPackageOption pkgs "qtile" { };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.xserver.windowManager.session = [{
|
|
|
|
name = "qtile";
|
|
|
|
start = ''
|
2022-04-15 01:41:22 +00:00
|
|
|
${cfg.package}/bin/qtile start &
|
2020-04-24 23:36:52 +00:00
|
|
|
waitPID=$!
|
|
|
|
'';
|
|
|
|
}];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
environment.systemPackages = [
|
|
|
|
# pkgs.qtile is currently a buildenv of qtile and its dependencies.
|
|
|
|
# For userland commands, we want the underlying package so that
|
|
|
|
# packages such as python don't bleed into userland and overwrite intended behavior.
|
|
|
|
(cfg.package.unwrapped or cfg.package)
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|