Commit e165ec89dbe0
Changed files (1)
emacs.nix
@@ -2,6 +2,36 @@
{
home.packages = with pkgs; [ emacs-scripts ];
+ systemd.user.services.emacs = {
+ Unit = {
+ Description = "Emacs: the extensible, self-documenting text editor";
+ };
+ Service = {
+ Environment = "PATH=/home/vincent/.local/npm/bin:/run/wrappers/bin:/etc/profiles/per-user/vincent/bin:${config.home.profileDirectory}/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin";
+ Type = "forking";
+ ExecStart = "/home/vincent/.nix-profile/bin/emacs --daemon";
+ ExecStop = "/home/vincent/.nix-profile/bin/emacsclient --eval (kill-emacs)";
+ Restart = "always";
+ };
+ Install = {
+ WantedBy = [ "default.target" ];
+ };
+ };
+ systemd.user.services.emacs-org = {
+ Unit = {
+ Description = "Emacs: the extensible, self-documenting text editor";
+ };
+ Service = {
+ Environment = "PATH=/home/vincent/.local/npm/bin:/run/wrappers/bin:/etc/profiles/per-user/vincent/bin:${config.home.profileDirectory}/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin";
+ Type = "forking";
+ ExecStart = "/home/vincent/.nix-profile/bin/emacs --daemon=org";
+ ExecStop = "/home/vincent/.nix-profile/bin/emacsclient --socket-name=org --eval (kill-emacs)";
+ Restart = "always";
+ };
+ Install = {
+ WantedBy = [ "default.target" ];
+ };
+ };
programs.emacs = {
enable = true;
# package = pkgs.myEmacs;