From f840fea7c32782349102b2356b2a30bab9d61a05 Mon Sep 17 00:00:00 2001 From: David Crompton Date: Sat, 1 Feb 2025 11:09:51 -0500 Subject: [PATCH] Update option for wayland or not --- flake.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 9ed059f..9da48fe 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,9 @@ inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils, emacs-overlay }: let - mkEmacs = pkgs: v: pkgs.emacsWithPackagesFromUsePackage { + mkEmacs = pkgs: v: wayland: pkgs.emacsWithPackagesFromUsePackage { config = ./main.org; - package = (pkgs."${v}${if pkgs.stdenv.isDarwin then "-macport" else "-pgtk"}").overrideAttrs (old: { + package = (pkgs."${v}${if pkgs.stdenv.isDarwin then "-macport" else (if wayland then "-pgtk" else "")}").overrideAttrs (old: { passthru = old.passthru // { treeSitter = true; }; @@ -25,11 +25,13 @@ }; in { packages = { - me-emacs = mkEmacs pkgs "emacs29"; + me-emacs = mkEmacs pkgs "emacs29" false; + me-emacs-wayland = mkEmacs pkgs "emacs29" true; }; })) // { overlays.default = final: prev: (emacs-overlay.overlays.default final prev) // { - me-emacs = mkEmacs final "emacs29"; + me-emacs = mkEmacs final "emacs29" false; + me-emacs-wayland = mkEmacs final "emacs29" true; }; }; }