diff --git a/common/home-manager/emacs/default.nix b/common/home-manager/emacs/default.nix index d44882c..ed67530 100644 --- a/common/home-manager/emacs/default.nix +++ b/common/home-manager/emacs/default.nix @@ -17,8 +17,10 @@ in { }; services.emacs.enable = true; + services.emacs.package = pkgs.emacsNativeComp; programs.emacs = { enable = true; + package = pkgs.emacsNativeComp; init = { enable = true; diff --git a/common/users/cadey/spacemacs/default.nix b/common/users/cadey/spacemacs/default.nix index 596eabb..7d32cae 100644 --- a/common/users/cadey/spacemacs/default.nix +++ b/common/users/cadey/spacemacs/default.nix @@ -19,7 +19,9 @@ in home.packages = with pkgs; [ anonymousPro e ]; programs.emacs.enable = true; + programs.emacs.package = pkgs.emacsNativeComp; services.emacs.enable = true; + services.emacs.package = pkgs.emacsNativeComp; home.file.".spacemacs".source = ./spacemacs; diff --git a/flake.lock b/flake.lock index a5b9e4b..ecbedbc 100644 --- a/flake.lock +++ b/flake.lock @@ -38,6 +38,21 @@ "type": "github" } }, + "emacs-overlay": { + "locked": { + "lastModified": 1650104515, + "narHash": "sha256-fuvcZH6wVqRGo/yeJkHh3jmKmTZhYTxTc3xTe+fSkt4=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "ba54077d5eb8fedfede088ce174a6a0aa5e4dc8b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -318,6 +333,7 @@ "inputs": { "agenix": "agenix", "deploy-rs": "deploy-rs", + "emacs-overlay": "emacs-overlay", "home-manager": "home-manager", "mara": "mara", "nixpkgs": "nixpkgs_4", diff --git a/flake.nix b/flake.nix index c086098..c33e184 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ home-manager.url = "github:nix-community/home-manager"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; utils.url = "github:numtide/flake-utils"; + emacs-overlay.url = "github:nix-community/emacs-overlay"; # my apps printerfacts = { @@ -31,7 +32,7 @@ }; outputs = { self, nixpkgs, deploy-rs, home-manager, agenix, printerfacts, mara - , rhea, waifud, ... }: + , rhea, waifud, emacs-overlay, ... }: let pkgs = nixpkgs.legacyPackages."x86_64-linux"; mkSystem = extraModules: @@ -49,6 +50,9 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; }) + ({ config, ... }: { + nixpkgs.overlays = [ emacs-overlay.overlay ]; + }) ./common printerfacts.nixosModules.${system}.printerfacts