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 = {