dwl: wayland-session setup

This commit is contained in:
Zynh Ludwig 2024-10-06 21:20:25 -07:00
parent 28b5d14f1b
commit d0af44785e

View file

@ -7,13 +7,23 @@ in
options.snowhawk.dwl = { options.snowhawk.dwl = {
enable = lib.mkEnableOption "dwl"; enable = lib.mkEnableOption "dwl";
package = lib.mkPackageOption pkgs "dwl" { }; package = lib.mkOption {
type = with lib.types; package;
default = pkgs.dwl;
apply = p: p.overrideAttrs {
postInstall = ''
mkdir -p $out/share/wayland-sessions
install $src/dwl.desktop -Dt $out/share/wayland-sessions
'';
passthru.providedSessions = [ "dwl" ];
};
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.graphical-desktop.enable = lib.mkDefault true; services.graphical-desktop.enable = lib.mkDefault true;
services.displayManager.sessionPackages = cfg.package; services.displayManager.sessionPackages = [ cfg.package ];
services.displayManager.defaultSession = "dwl"; services.displayManager.defaultSession = "dwl";
security = { security = {