diff options
author | Acid Bong <acidbong@tilde.club> | 2024-04-26 19:43:07 +0300 |
---|---|---|
committer | Acid Bong <acidbong@tilde.club> | 2024-04-26 20:08:12 +0300 |
commit | abdeca343a8683c6bc752958907bc3c45452d99b (patch) | |
tree | ab93f3a6aa5fdcf6e58bc87f1ec385b5af7a5fdd | |
parent | 637f958ce99df7be04ccdca082b93e99dcf10cf6 (diff) |
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
-rw-r--r-- | nixos/modules/services/x11/window-managers/qtile.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/services/x11/window-managers/qtile.nix b/nixos/modules/services/x11/window-managers/qtile.nix index 78152283a0a58..700ead8366008 100644 --- a/nixos/modules/services/x11/window-managers/qtile.nix +++ b/nixos/modules/services/x11/window-managers/qtile.nix @@ -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=$! |