From 4d15621f4f2a5ccc4bc3c939113bff254eb1b876 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 15 Mar 2024 11:44:32 +0000 Subject: [PATCH] Restore emacs service, start with graphical session --- home/emacs/default.nix | 26 ++++++++++++++++++-------- home/hyprland/default.nix | 4 ++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/home/emacs/default.nix b/home/emacs/default.nix index 7d8f307d..bd871405 100644 --- a/home/emacs/default.nix +++ b/home/emacs/default.nix @@ -4,7 +4,7 @@ ... }: { imports = [../git/default.nix ../prog/default.nix]; - programs.git.extraConfig.core.editor = "${config.programs.emacs.finalPackage}/bin/emacs"; + programs.git.extraConfig.core.editor = "$EDITOR"; programs.emacs = { # Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git # git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.config/emacs @@ -127,14 +127,24 @@ elfeed-tube-mpv ]; }; - services.git-sync.repositories = with config.xdg.userDirs; { - org = { - path = "${documents}/Org"; - uri = "git+https://git.xenia.me.uk/xenia/org.git"; + services = { + emacs = { + enable = true; + package = config.programs.emacs.finalPackage; + defaultEditor = true; + client.enable = true; + socketActivation.enable = false; + startWithUserSession = "graphical"; }; - references = { - path = "${documents}/References"; - uri = "git+https://git.xenia.me.uk/xenia/references.git"; + git-sync.repositories = with config.xdg.userDirs; { + org = { + path = "${documents}/Org"; + uri = "git+https://git.xenia.me.uk/xenia/org.git"; + }; + references = { + path = "${documents}/References"; + uri = "git+https://git.xenia.me.uk/xenia/references.git"; + }; }; }; home.packages = with pkgs; [ diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 7d9c3764..93f07982 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -277,8 +277,8 @@ # Common program shortcuts "SUPER, Return, exec, ${alacritty.package}/bin/alacritty" - "SUPER, E, exec, [workspace 1] ${emacs.finalPackage}/bin/emacsclient -c -a \"${emacs.finalPackage}/bin/emacs -f server-start\"" - "SUPER, W, exec, [workspace 2] ${pkgs.firefox}/bin/firefox" + "SUPER, E, exec, [workspace 1 silent] ${emacs.finalPackage}/bin/emacsclient -c" + "SUPER, W, exec, [workspace 2 silent] ${pkgs.firefox}/bin/firefox" # Rofi binds "SUPER, Space, exec, pkill rofi || ${rofi.finalPackage}/bin/rofi -show drun"