1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/tests/modules/services/emacs/linux/emacs-default-editor.nix
Austin Horstman c283a23ef6 tests/emacs: reorganize darwin and linux
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 23:58:37 -05:00

22 lines
462 B
Nix

{ 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.replaceVars ./emacs-default-editor.sh {
inherit (pkgs) coreutils;
}
}";
}