1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-18 00:59:44 +01:00
home-manager/tests/modules/services/emacs/emacs-default-editor.nix

25 lines
495 B
Nix
Raw Normal View History

2023-05-13 00:08:12 +02:00
{ pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
# Use `cat` instead of `echo` to prevent arguments from being
# interpreted as an option.
emacs = pkgs.writeShellScriptBin "emacsclient"
''${pkgs.coreutils}/bin/cat <<< "$*"'';
})
];
services.emacs = {
defaultEditor = true;
enable = true;
};
nmt.script = "source ${
pkgs.substituteAll {
inherit (pkgs) coreutils;
src = ./emacs-default-editor.sh;
}
}";
}