Enable emacs service on socket activation

Move emacs dependencies into home/emacs/default.nix to avoid having
two files

Don't start emacs server from hyprland startup now

Remove firefox home module, use system module only
This commit is contained in:
Evie Litherland-Smith 2024-01-29 08:21:26 +00:00
parent d4c1835bfa
commit c006895344
5 changed files with 61 additions and 57 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { { config, pkgs, ... }: {
programs.emacs = { programs.emacs = {
# Clone emacs config from https://git.xenia.me.uk/xenia/emacs.git # Clone emacs config from https://git.xenia.me.uk/xenia/emacs.git
enable = true; enable = true;
@ -103,4 +103,61 @@
elfeed-tube-mpv elfeed-tube-mpv
]; ];
}; };
services.emacs = {
enable = true;
package = config.programs.emacs.finalPackage;
startWithUserSession = false;
defaultEditor = true;
client.enable = true;
socketActivation.enable = true;
};
home.packages = with pkgs; [
# Emacs requirements
fd
ripgrep
imagemagick
languagetool
wordnet
(aspellWithDicts (ds: with ds; [ en en-computers en-science ]))
# For org-plot
gnuplot
# For EMMS
mp3info
# Language-specific requirements
sqlite
pandoc
ghostscript
mupdf
poppler_utils
# Customised LaTeX install
# texlive.combined.scheme-full
(texlive.combine {
inherit (pkgs.texlive)
scheme-basic dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of;
})
# Linters
shellcheck
# Formatters
nodePackages.prettier
nixfmt
ruff
isort
fprettify
rustfmt
stylua
shfmt
# LSP Servers
nil
fortls
rust-analyzer
luajitPackages.lua-lsp
python3Packages.jedi-language-server
];
} }

View file

@ -8,7 +8,6 @@
../swaync/default.nix ../swaync/default.nix
../emacs/default.nix ../emacs/default.nix
../nyxt/default.nix ../nyxt/default.nix
../firefox/default.nix
../obs/default.nix ../obs/default.nix
]; ];
services = { services = {
@ -87,7 +86,7 @@
]; ];
exec-once = with config; [ exec-once = with config; [
"hyprctl setcursor ${gtk.theme.name} ${toString gtk.cursorTheme.size}" "hyprctl setcursor ${gtk.theme.name} ${toString gtk.cursorTheme.size}"
"git -C $HOME/.emacs pull --ff-only; emacs --fg-daemon" "git -C $HOME/.emacs pull --ff-only"
"swaync" "swaync"
"${pkgs.hyprpaper}/bin/hyprpaper" "${pkgs.hyprpaper}/bin/hyprpaper"
"${pkgs.dex}/bin/dex --autostart" "${pkgs.dex}/bin/dex --autostart"

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { { ... }: {
programs.chromium = rec { programs.chromium = rec {
enable = true; enable = true;
defaultSearchProviderEnabled = true; defaultSearchProviderEnabled = true;

View file

@ -1,52 +0,0 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
# Emacs + requirements
emacs29-pgtk
fd
ripgrep
imagemagick
languagetool
wordnet
(aspellWithDicts (ds: with ds; [ en en-computers en-science ]))
# For org-plot
gnuplot
# For EMMS
mp3info
# Language-specific requirements
sqlite
pandoc
ghostscript
mupdf
poppler_utils
# Customised LaTeX install
# texlive.combined.scheme-full
(texlive.combine {
inherit (pkgs.texlive)
scheme-basic dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of;
})
# Linters
shellcheck
# Formatters
nodePackages.prettier
nixfmt
ruff
isort
fprettify
rustfmt
stylua
shfmt
# LSP Servers
nil
fortls
rust-analyzer
luajitPackages.lua-lsp
python3Packages.jedi-language-server
];
}

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }: {
imports = [ ./desktop.nix ./emacs.nix ./firefox.nix ./chromium.nix ]; imports = [ ./desktop.nix ./firefox.nix ./chromium.nix ];
nixpkgs.config.chromium.commandLineArgs = nixpkgs.config.chromium.commandLineArgs =
"--enable-features=UseOzonePlatform --ozone-platform=wayland"; "--enable-features=UseOzonePlatform --ozone-platform=wayland";
environment = { environment = {