diff options
author | Vizaxo <viazxo@mailfence.com> | 2019-05-27 02:18:42 +0100 |
---|---|---|
committer | Vizaxo <viazxo@mailfence.com> | 2019-05-27 02:18:42 +0100 |
commit | 47aa44ba3768267eba94c08dcbdd9502431bb018 (patch) | |
tree | 22eeafdbe03a971f83ba64158aa6cb9b73e90818 /nixos | |
parent | 8d219aa5787805886fe7115c39ec50734ca2357d (diff) | |
download | nixpkgs-47aa44ba3768267eba94c08dcbdd9502431bb018.tar nixpkgs-47aa44ba3768267eba94c08dcbdd9502431bb018.tar.gz nixpkgs-47aa44ba3768267eba94c08dcbdd9502431bb018.tar.bz2 nixpkgs-47aa44ba3768267eba94c08dcbdd9502431bb018.tar.lz nixpkgs-47aa44ba3768267eba94c08dcbdd9502431bb018.tar.xz nixpkgs-47aa44ba3768267eba94c08dcbdd9502431bb018.tar.zst nixpkgs-47aa44ba3768267eba94c08dcbdd9502431bb018.zip |
nixos/exwm: allow custom Emacs load script
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.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/window-managers/exwm.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/window-managers/exwm.nix b/nixos/modules/services/x11/window-managers/exwm.nix index dc1d957c170..88e13f4dbfb 100644 --- a/nixos/modules/services/x11/window-managers/exwm.nix +++ b/nixos/modules/services/x11/window-managers/exwm.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.services.xserver.windowManager.exwm; loadScript = pkgs.writeText "emacs-exwm-load" '' - (require 'exwm) + ${cfg.loadScript} ${optionalString cfg.enableDefaultConfig '' (require 'exwm-config) (exwm-config-default) @@ -19,6 +19,18 @@ in options = { services.xserver.windowManager.exwm = { enable = mkEnableOption "exwm"; + loadScript = mkOption { + default = "(require 'exwm)"; + example = literalExample '' + (require 'exwm) + (exwm-enable) + ''; + description = '' + Emacs lisp code to be run after loading the user's init + file. If enableDefaultConfig is true, this will be run + before loading the default config. + ''; + }; enableDefaultConfig = mkOption { default = true; type = lib.types.bool; |