11.stylix/stylix/testbed/graphical-environments/bspwm.nix
Mateus Auler 8c854fe383
stylix: allow choosing testbed desktop (#1222)
Allow choosing the testbed desktop, ideally as a temporary solution
until migrating to the cage environment.

Link: https://github.com/nix-community/stylix/pull/1222

Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-07-16 15:43:02 +02:00

31 lines
844 B
Nix

{
config,
lib,
pkgs,
...
}:
{
config =
lib.mkIf (config.stylix.testbed.ui.graphicalEnvironment or null == "bspwm")
{
services.xserver = {
enable = true;
windowManager.bspwm.enable = true;
};
environment.systemPackages = [
# dex looks for `x-terminal-emulator` when running a terminal program
(pkgs.writeShellScriptBin "x-terminal-emulator" ''exec ${lib.getExe pkgs.kitty} "$@"'')
];
home-manager.sharedModules = lib.singleton {
programs.kitty.enable = true;
xsession.windowManager.bspwm = {
enable = true;
startupPrograms = [
"find /run/current-system/sw/etc/xdg/autostart/ -type f -or -type l | xargs -P0 -L1 ${lib.getExe pkgs.dex}"
];
};
};
};
}