Moved emacs to home manager config

This commit is contained in:
Aleksandr Lebedev 2025-07-25 23:42:39 +02:00
parent 9c895e9cc0
commit 4467239f01
7 changed files with 29 additions and 80 deletions

6
flake.lock generated
View file

@ -333,11 +333,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1753476892, "lastModified": 1753479356,
"narHash": "sha256-VZg9Oq9apTi2JEnlOSiCGl6iglwqNFr6A2u3CTWqGpQ=", "narHash": "sha256-fJZgp57I30SMZKwq2UQfGBkM4R7HqrZLde9YRUBe3dw=",
"owner": "kylekrein", "owner": "kylekrein",
"repo": "emacs-config", "repo": "emacs-config",
"rev": "1b0367dca5e6b37e2ca9c53f41f2316a5bf335eb", "rev": "c256cbb11af63a3f5026ab4a9c427f51ef0d2dae",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -27,7 +27,6 @@ in {
./modules/services/autoupgrade ./modules/services/autoupgrade
./modules/sops ./modules/sops
./modules/dolphin ./modules/dolphin
./modules/emacs
./modules/gnupg ./modules/gnupg
./modules/direnv ./modules/direnv
./hosts/${hwconfig.hostname} ./hosts/${hwconfig.hostname}

View file

@ -0,0 +1,18 @@
{
hwconfig,
inputs,
...
}: let
emacs = inputs.emacs-kylekrein.packages.${hwconfig.system}.with-lsps;
in {
programs.emacs = {
enable = true;
package = emacs;
};
services.emacs = {
enable = true;
package = emacs;
startWithUserSession = true;
client.enable = true;
};
}

View file

@ -20,6 +20,7 @@
imports = [ imports = [
./waybar ./waybar
./hyprlock.nix ./hyprlock.nix
./emacs.nix
]; ];
home.packages = with pkgs; home.packages = with pkgs;
[ [
@ -99,12 +100,12 @@
"${../../modules/hyprland/wallpaper.jpg}" "${../../modules/hyprland/wallpaper.jpg}"
]; ];
} }
{ #{
command = [ # command = [
"emacs" # "emacs"
"--daemon" # "--daemon"
]; # ];
} #}
]; ];
layout = { layout = {
preset-column-widths = [ preset-column-widths = [

View file

@ -1,17 +0,0 @@
{
config,
pkgs,
lib,
inputs,
hwconfig,
...
}: let
emacs = inputs.emacs-kylekrein.packages.${hwconfig.system}.with-lsps;
in {
services.emacs.enable = true;
services.emacs.startWithGraphical = true;
services.emacs.install = true;
services.emacs.package = emacs;
environment.systemPackages = [emacs];
}

View file

@ -1,52 +0,0 @@
{
pkgs,
emacs,
}: {
packages = with pkgs; [
git
gzip
wkhtmltopdf
zip
unzip
gnutar
libvterm
libtool
emacs
ripgrep
fd
ghostscript
coreutils
clang
cmake
nixfmt-rfc-style
markdownlint-cli
pandoc
groff
gnumake
python3
isort
pipenv
python313Packages.nose2
python313Packages.pytest
graphviz
shellcheck
nodejs_23
(pkgs.writeShellScriptBin "doom-install" ''
${pkgs.git}/bin/git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d
${pkgs.git}/bin/git clone https://github.com/KyleKrein/doomemacs.git ~/.doom.d
~/.emacs.d/bin/doom install
~/.emacs.d/bin/doom sync
pidof emacs || ${emacs}/bin/emacs --daemon &
'')
(pkgs.writeShellScriptBin "doom-sync" ''
~/.emacs.d/bin/doom sync --aot --force
'')
(pkgs.writeShellScriptBin "doom-upgrade" ''
~/.emacs.d/bin/doom upgrade
'')
(pkgs.writeShellScriptBin "doom" ''
${emacs}/bin/emacsclient -c -a "${emacs}/bin/emacs"
'')
];
}

View file

@ -12,7 +12,6 @@
[ [
./modules/firefox ./modules/firefox
./modules/flatpak ./modules/flatpak
./modules/emacs
./modules/gnupg ./modules/gnupg
./modules/direnv ./modules/direnv
./hosts/${hwconfig.hostname} ./hosts/${hwconfig.hostname}
@ -39,6 +38,7 @@
}; };
users.extraGroups.docker.members = ["nixos"]; users.extraGroups.docker.members = ["nixos"];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
inputs.emacs-kylekrein.packages.${pkgs.system}.with-lsps-native
killall killall
nix-output-monitor nix-output-monitor
eza eza