From d0af44785e215b4775f9763749c9bda625cee12b Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Sun, 6 Oct 2024 21:20:25 -0700 Subject: [PATCH] dwl: wayland-session setup --- modules/dwl.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/dwl.nix b/modules/dwl.nix index f2a6fd8..0036097 100644 --- a/modules/dwl.nix +++ b/modules/dwl.nix @@ -7,13 +7,23 @@ in options.snowhawk.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 { services.graphical-desktop.enable = lib.mkDefault true; - services.displayManager.sessionPackages = cfg.package; + services.displayManager.sessionPackages = [ cfg.package ]; services.displayManager.defaultSession = "dwl"; security = {