From 034af03888a89406a4572f532e590b7e62b35098 Mon Sep 17 00:00:00 2001 From: Jake Ginesin Date: Tue, 10 Jun 2025 01:09:35 -0400 Subject: [PATCH] 427 current 2025-06-10 01:09:14 25.05.20250424.f771eb4 6.12.24 * --- flake.lock | 38 ++++++++++ flake.nix | 10 ++- home/programs/emacs/default.nix | 129 ++++++++++++++++++++++++++++++-- 3 files changed, 168 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index d26c02e..a7276ae 100644 --- a/flake.lock +++ b/flake.lock @@ -43,6 +43,27 @@ "type": "github" } }, + "emacs-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1749521434, + "narHash": "sha256-iYuO2A6EeCk3yt7i+u5BbKpYUKBWZrWwEvyMzx7JL8o=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "a1fc4a1252cf8f730d39a6570d36b9b95b478cd5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -100,6 +121,22 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1749173751, + "narHash": "sha256-ENY3y3v6S9ZmLDDLI3LUT8MXmfXg/fSt2eA4GCnMVCE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ed29f002b6d6e5e7e32590deb065c34a31dc3e91", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1745526057, @@ -119,6 +156,7 @@ "root": { "inputs": { "agenix": "agenix", + "emacs-overlay": "emacs-overlay", "home-manager": "home-manager_2", "nixpkgs": "nixpkgs_2" } diff --git a/flake.nix b/flake.nix index 890dc25..b35288d 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; agenix.url = "github:ryantm/agenix"; + + emacs-overlay = { + url = "github:nix-community/emacs-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { @@ -15,13 +20,16 @@ nixpkgs, home-manager, agenix, + emacs-overlay, } @ inputs: let baseModule = { # imports = [ # home-manager.nixosModules.default # ]; system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; - nixpkgs.overlays = []; + nixpkgs.overlays = [ + inputs.emacs-overlay.overlay + ]; }; in { nixosConfigurations.thonkpad = nixpkgs.lib.nixosSystem { diff --git a/home/programs/emacs/default.nix b/home/programs/emacs/default.nix index b7eeadf..9549c56 100644 --- a/home/programs/emacs/default.nix +++ b/home/programs/emacs/default.nix @@ -1,15 +1,128 @@ { - config, pkgs, - callPackage, + lib, + config, ... }: { - nixpkgs.overlays = [ - (import (builtins.fetchTarball { - url = "https://github.com/nix-community/emacs-overlay/archive/master.tar.gz"; - })) + programs.emacs = { + enable = true; + # package = pkgs.emacs-gtk; + # package = pkgs.emacs-unstable; + extraPackages = epkgs: [ + epkgs.vterm + epkgs.irony + epkgs.irony-eldoc + epkgs.git-commit + ]; + }; + + services.emacs = { + enable = true; + package = pkgs.emacs-gtk; + startWithUserSession = "graphical"; + socketActivation.enable = true; + # defaultEditor = true; + client = { + enable = true; + }; + }; + + home.packages = with pkgs; [ + (writeShellApplication { + name = "ec"; + runtimeInputs = [emacs]; + + text = '' + emacsclient -c + ''; + }) + wordnet + w3m + ## Emacs itself + binutils + coreutils + # 28.2 + native-comp + #((emacsPackagesFor pkgs.emacs-gtk).emacsWithPackages + #(epkgs: [ epkgs.vterm ])) + + # necessary for vterm + cmake + gnumake + gcc + libtool + + # emacsPackages.agda-input + emacsPackages.agda2-mode + emacsPackages.agda-editor-tactics + + ## Doom dependencies + (ripgrep.override {withPCRE2 = true;}) + gnutls + + # Performance booster + emacs-lsp-booster + + ## Treemacs + python3 + + ## Optional dependencies + imagemagick + zstd + sqlite + # gcc # moved to environment.systemPackages + + ## Module dependencies + # :checkers spell + (aspellWithDicts (ds: with ds; [en en-computers en-science])) + # :tools editorconfig + editorconfig-core-c + # :tools lookup & :lang org +roam + sqlite + # :lang latex & :lang org (latex previews) + texlive.combined.scheme-medium + # :app everywhere + xclip + xdotool + xorg.xwininfo + xorg.xprop + # :lang cc + # clang # moved to environment.systemPackages + # clang-tools + # github copilot + + ## Fonts + # dejavu_fonts + # source-serif-pro + # fira-code + # fira-code-symbols + # noto-fonts + # font-awesome + # iosevka + # iosevka-bin + # iosevka-comfy.comfy-wide + # iosevka-comfy.comfy-wide-duo + # iosevka-comfy.comfy-wide-fixed + # iosevka-comfy.comfy-wide-motion + # iosevka-comfy.comfy-wide-motion-duo + # iosevka-comfy.comfy-wide-motion-fixed + # modeline + nerd-font-patcher + + # eaf + wmctrl + fd + aria ]; - services.emacs.package = pkgs.emacs-unstable; - services.emacs.enable = true; + # fonts.fontconfig.enable = true; + # Install doom emacs + # home.activation = { + # installDoomEmacs = lib.hm.dag.entryAfter ["installPhase"] '' + # if [ ! -d "${config.xdg.configHome}/emacs" ]; then + # ${pkgs.git}/bin/git clone --depth=1 --single-branch "https://github.com/doomemacs/doomemacs" "${config.xdg.configHome}/emacs" + # GIT_SSH_COMMAND = ${pkgs.openssh}/bin/ssh ${pkgs.git}/bin/git clone "git@github.com:Cajunvooodoo/Doom-Emacs-Config.git" "${config.xdg.configHome}/doom" + + # fi + # ''; + # }; }