Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/exwm: allow custom Emacs load script #62104

Merged
merged 1 commit into from Nov 29, 2020
Merged

nixos/exwm: allow custom Emacs load script #62104

merged 1 commit into from Nov 29, 2020

Conversation

@Vizaxo
Copy link

@Vizaxo Vizaxo commented May 27, 2019

Add config option services.xserver.windowManager.exwm.loadScript,
which is passed to Emacs (as the -l option) to load after the user's init file.

Motivation for this change

This allows me to specify that (exwm-enable) should be run on the exwm Emacs instance, without putting it in my general Emacs config.

Things done

Tested on my NixOS box, both with default configuration (leaves everything as it currently is), and with example configuration (adding (exwm-enable)).

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Add config option services.xserver.windowManager.exwm.loadScript,
which is passed to Emacs (as the -l option) to load after the user's init file.
@adisbladis
Copy link
Member

@adisbladis adisbladis commented Aug 6, 2019

What's the use-case for this?

@Vizaxo
Copy link
Author

@Vizaxo Vizaxo commented Sep 1, 2019

What's the use-case for this?

It allows some Emacs init code to be conditionally run depending on whether or not Emacs is launched from the command line or as the window manager, without having to make any changes to the init file.

Currently, the only conditional option is whether to enable the default config or not. I don't use the default config, so I've set the load script to just initialise exwm and the rest of the configuration is done in my init file.

@moritzschaefer
Copy link
Contributor

@moritzschaefer moritzschaefer commented May 13, 2020

I am at the moment struggling to get a system tray running with EXWM on NixOS (any hints/alternatives appreciated).

This PR would solve my problems elegantly, since the EXWM docs say, one should require the exwm-system-tray before exwm itself.

I'd appreciate a merge

@stale
Copy link

@stale stale bot commented Nov 9, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale label Nov 9, 2020
@moritzschaefer
Copy link
Contributor

@moritzschaefer moritzschaefer commented Nov 9, 2020

@Stale, I don't see a reason why this PR does not get attention. Defaults are not changed and at the moment, the system is just not flexible enough.

@stale stale bot removed the 2.status: stale label Nov 9, 2020
@Vizaxo
Copy link
Author

@Vizaxo Vizaxo commented Nov 10, 2020

@Stale, I don't see a reason why this PR does not get attention. Defaults are not changed and at the moment, the system is just not flexible enough.

@moritzschaefer Thanks for pinging this again; I'd also like a merge (I'm currently using this commit rebased on top of a local nixpkgs repo). Not sure exactly if there's anything else I need to do, or if there are any maintainers we can ping to get this looked at (I can't see any maintainers listed in the source file).

@moritzschaefer
Copy link
Contributor

@moritzschaefer moritzschaefer commented Nov 29, 2020

We can try to ping @jonringer or @SuperSandro2000.

@jonringer
Copy link
Contributor

@jonringer jonringer commented Nov 29, 2020

you rang?

Copy link
Contributor

@jonringer jonringer left a comment

preserves old behavior, but allows for extensibility

cc @ryantm who is an emacs user (I'm a dirty vim plebeian)

ryantm
ryantm approved these changes Nov 29, 2020
@ryantm ryantm merged commit cb42d08 into NixOS:master Nov 29, 2020
12 checks passed
12 checks passed
@ofborg[bot]
Evaluation Performance Report Evaluator Performance Report
Details
@ofborg[bot]
grahamcofborg-eval ^.^!
Details
@ofborg[bot]
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg[bot]
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
@ofborg[bot]
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
@ofborg[bot]
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
@ofborg[bot]
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
@ofborg[bot]
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg[bot]
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants