This what I am getting:
The program 'emacsclient' is not in your PATH. It is provided by several packages.
You can make it available in an ephemeral shell by typing one of the following:
nix-shell -p emacs
nix-shell -p emacs-gtk
nix-shell -p emacs-nox
nix-shell -p emacs28-gtk2
nix-shell -p emacs29
nix-shell -p emacs29-gtk3
nix-shell -p emacs29-nox
nix-shell -p emacs29-pgtk
- (line 1):
function emacs --wraps emacsclient\ -c\ -a\ \'emacs\' --description alias\ emacs=emacsclient\ -c\ -a\ \'emacs\'; emacsclient -c -a 'emacs' $argv
^~~~~~~~~~^
in function 'emacs' with arguments '-c -a emacs'
╭─ ~/.local/bin ──────────────────────────
╰─❯ which emacs
which: no emacs in (/home/paul/.local/bin:/home/paul/Applications:/home/paul/.emacs.d/bin:/run/wrappers/bin:/home/paul/.nix-profile/bin:/nix/profile/bin:/home/paul/.local/state/nix/profile/bin:/etc/profiles/per-user/paul/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/nix/store/1iwpd4f9i1jmy2mzajfic0pl97qnx559-kitty-0.32.1/bin:/nix/store/27b7dji2svb4dfcram92zvr8dl9zfi0g-imagemagick-7.1.1-27/bin:/nix/store/69pv6agzxy6mn915cp1q0qvs88ffp4vd-ncurses-6.4-dev/bin)
╭─ ~/.local/bin ─────────────────────────────────────────────────────────────────────────────────────────────────────── 19:55:45
╰─❯ which emacsclient
which: no emacsclient in (/home/paul/.local/bin:/home/paul/Applications:/home/paul/.emacs.d/bin:/run/wrappers/bin:/home/paul/.nix-profile/bin:/nix/profile/bin:/home/paul/.local/state/nix/profile/bin:/etc/profiles/per-user/paul/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/nix/store/1iwpd4f9i1jmy2mzajfic0pl97qnx559-kitty-0.32.1/bin:/nix/store/27b7dji2svb4dfcram92zvr8dl9zfi0g-imagemagick-7.1.1-27/bin:/nix/store/69pv6agzxy6mn915cp1q0qvs88ffp4vd-ncurses-6.4-dev/bin)
~/.local/bin ─────────────────────────────────────────────────────────────────────────────────────────────────────── 19:56:29
╰─❯ whereis emacs
emacs:
╭─ ~/.local/bin ─────────────────────────────────────────────────────────────────────────────────────────────────────── 19:56:34
╰─❯ whereis emacsclient
emacsclient:
╭─ ~/.local/bin ─
Now after a rebuild test:
─❯ which emacsclient
/etc/profiles/per-user/paul/bin/emacsclient
╭─ /etc/nixos ───────────────────────────────────────────────────────────────────────────────────────────────────────── 19:58:26
╰─❯ which emacs
/etc/profiles/per-user/paul/bin/emacs
╰─❯ whereis emacsclient
emacsclient: /nix/store/54l9nyzr3v9h5dmm92pajg9l0z3lvws6-user-environment/bin/emacsclient /nix/store/57dhp765wamdzhfz9aidmwqqp3czb9pi-system-path/bin/emacsclient
╭─ /etc/nixos ─────────────────────────────────────────────────────────────────────────────────────────────────
──────── 19:59:02
╰─❯ whereis emacs
emacs: /nix/store/54l9nyzr3v9h5dmm92pajg9l0z3lvws6-user-environment/bin/emacs /nix/store/57dhp765wamdzhfz9aidmwqqp3czb9pi-system-path/bin/emacs
I set up the service as follows:
[Unit]
Description=Emacs text editor
[Service]
Type=forking
ExecStart=*
ExecStop=*
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=on-failure
[Install]
WantedBy=default.target
The astersisks represent paths of the form above taken from the whereis command. Placed the service in
~/.config/systemd/user/emacs.service
The problem seems to be with home-manager. I added zellij to configuration.nix, did a rebuild switch with no errors but zellij was not found in my path. When I added it to home manager, and repeated the rebuil switch, then it loaded. However, on reboot, I got the same errors as I did with emacs. Total noob observation as I am just getting started with Nix and Nixos, but since in theory the flake "controls"everything, should I be inputting something there about emacs and zellij?