Skip to content

Specifying a custom emacs executable for the exwm.nix service #99424

@leungbk

Description

@leungbk

I'd like a way to be able to specify the Emacs executable used with the EXWM service, like

  services.xserver.windowManager.exwm = { executable = pkgs.emacs26 }

The reason I want this is that I don't want to have to specify the packages by hand; it would be nice if I could write

  services.xserver.windowManager.exwm = {
    executable = emacsWithPackagesFromUsePackage{
      config = ./init.el;
      package = pkgs.emacsGit;
    };
  };

where emacsWithPackagesFromUsePackage is defined in nix-community/emacs-overlay.

The exwm.nix service presently specifies the Emacs executable as exwm-emacs = pkgs.emacsWithPackages packages, where the executable is (I'm guessing) automatically set to the latest stable version and where the packages must be specified by hand.

I don't know the Nix language very well, so it wouldn't surprise me if there already existed a nice way of doing this. But it looks to me like the most straightforward solution is to remove the services.xserver.windowManager.exwm.extraPackages property and ask for the user to specify the packages as part of the executable instead, which should work with or without the emacs-overlay but will be a breaking change to users presently specifying extraPackages and will require the user to specify the exwm Emacs package themselves in either their init.el or their configuration.nix. What do you think, @adisbladis?

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions