mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-23 21:33:49 +00:00
nixos/qtile: add finalPackage option
This exposes the resulting Qtile bundle in case the user wants to start Qtile session different than with a login manager
This commit is contained in:
parent
637f958ce9
commit
abdeca343a
@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.xserver.windowManager.qtile;
|
||||
pyEnv = pkgs.python3.withPackages (p: [ (cfg.package.unwrapped or cfg.package) ] ++ (cfg.extraPackages p));
|
||||
in
|
||||
|
||||
{
|
||||
@ -48,13 +47,24 @@ in
|
||||
];
|
||||
'';
|
||||
};
|
||||
|
||||
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.withPackages (p:
|
||||
[ (cfg.package.unwrapped or cfg.package) ] ++ (cfg.extraPackages p)
|
||||
);
|
||||
|
||||
services.xserver.windowManager.session = [{
|
||||
name = "qtile";
|
||||
start = ''
|
||||
${pyEnv}/bin/qtile start -b ${cfg.backend} \
|
||||
${cfg.finalPackage}/bin/qtile start -b ${cfg.backend} \
|
||||
${optionalString (cfg.configFile != null)
|
||||
"--config \"${cfg.configFile}\""} &
|
||||
waitPID=$!
|
||||
|
Loading…
Reference in New Issue
Block a user