NixOS/nixpkgs — pull request #1094 by bennofs (2013-10-19 19:22:19+00:00)
Title: Emacs: Fix TRAMP and enable nix-mode

After installing emacs using nix, you currently need to add these lines to get nix-mode and make TRAMP work for NixOS systems:

```lisp
;; enable nix-mode (lazy)
(autoload 'nix-mode "nix-mode" "Major mode for editing Nix expressions." t)
(push '("\.nix\'" . nix-mode) auto-mode-alist)
(push '("\.nix.in\'" . nix-mode) auto-mode-alist)

;; make tramp work for NixOS machines
(eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
```

This patch adds these lines to site-start, so they get executed automatically and do not have to be added by the user.