mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 04:31:52 +00:00
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.
This commit is contained in:
parent
8d219aa578
commit
47aa44ba37
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue