From fb621305f1f8bc17365f016e57afb47b60bb38b8 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 11 Mar 2021 01:57:37 +0300 Subject: [PATCH] Use pgtk emacs --- flake.lock | 16 ++++++++++++++++ flake.nix | 1 + modules/applications/emacs/default.nix | 14 +------------- modules/applications/emacs/init.el | 20 +++++++++++--------- modules/nix.nix | 7 ++++--- modules/overlay.nix | 1 + 6 files changed, 34 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index 7b2afa7..14a908a 100644 --- a/flake.lock +++ b/flake.lock @@ -70,6 +70,21 @@ "type": "github" } }, + "emacs-overlay": { + "locked": { + "lastModified": 1615335717, + "narHash": "sha256-nJ4CSh9hm5U1g+x0ev1nozhgfFVG2jKU1DCKoEMBbeI=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "2d16cdb183d1c5de65758d602a7fbb2f17d2099d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -385,6 +400,7 @@ "NUR": "NUR", "base16-unclaimed-schemes": "base16-unclaimed-schemes", "deploy-rs": "deploy-rs", + "emacs-overlay": "emacs-overlay", "flake-compat": "flake-compat_2", "home-manager": "home-manager", "lambda-launcher": "lambda-launcher", diff --git a/flake.nix b/flake.nix index e414422..49822cc 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,7 @@ wee-slack.flake = false; nix-zsh-completions.url = "github:Ma27/nix-zsh-completions/flakes"; nix-zsh-completions.flake = false; + emacs-overlay.url = "github:nix-community/emacs-overlay"; }; outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: { diff --git a/modules/applications/emacs/default.nix b/modules/applications/emacs/default.nix index af5914b..bac3e72 100644 --- a/modules/applications/emacs/default.nix +++ b/modules/applications/emacs/default.nix @@ -7,7 +7,7 @@ home-manager.users.balsoft = { programs.emacs = { enable = true; - package = pkgs.emacs; + package = pkgs.emacsPgtk; extraPackages = epkgs: with epkgs; [ use-package @@ -31,7 +31,6 @@ clipmon org-gcal company-ghci - xresources-theme company-tabnine expand-region ivy @@ -62,17 +61,6 @@ }; home.packages = [ - (pkgs.makeDesktopItem { - terminal = "false"; - type = "Application"; - name = "emacsclient"; - genericName = "Text editor"; - desktopName = "Emacs client"; - mimeType = "text/plain"; - exec = "emacsclient -c %F"; - categories = "Development;TextEditor;Utility;"; - icon = "emacs"; - }) pkgs.clang ]; diff --git a/modules/applications/emacs/init.el b/modules/applications/emacs/init.el index 39fe039..5a0c081 100755 --- a/modules/applications/emacs/init.el +++ b/modules/applications/emacs/init.el @@ -206,15 +206,15 @@ If point was already at that position, move point to beginning of line." ;; ------------------- ;; Theme ;; ------------------- -(use-package xresources-theme - :config - (load-theme 'xresources t) - (setq after-init-hook (load-theme 'xresources t)) - (add-hook 'after-make-frame-functions - (lambda (frame) - (with-selected-frame frame - (load-theme 'xresources t) - (set-frame-font "IBM Plex Mono 11" nil t))))) +;; (use-package xresources-theme +;; :config +;; (load-theme 'xresources t) +;; (setq after-init-hook (load-theme 'xresources t)) +;; (add-hook 'after-make-frame-functions +;; (lambda (frame) +;; (with-selected-frame frame +;; (load-theme 'xresources t) +;; (set-frame-font "IBM Plex Mono 11" nil t))))) (setq inhibit-startup-screen t) @@ -240,4 +240,6 @@ If point was already at that position, move point to beginning of line." :config (envrc-global-mode) (advice-add 'lsp :before (lambda (&optional n) (envrc--update)))) + +(load-theme 'manoj-dark t) ;;; init.el ends here diff --git a/modules/nix.nix b/modules/nix.nix index 227db0a..f1b4330 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -11,15 +11,16 @@ optimise.automatic = true; - binaryCachePublicKeys = - [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + binaryCachePublicKeys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; package = inputs.nix.packages.x86_64-linux.nix; extraOptions = '' experimental-features = nix-command flakes ''; - requireSignedBinaryCaches = false; + requireSignedBinaryCaches = true; }; environment.etc.nixpkgs.source = inputs.nixpkgs; } diff --git a/modules/overlay.nix b/modules/overlay.nix index 7481d94..1aea7fb 100644 --- a/modules/overlay.nix +++ b/modules/overlay.nix @@ -9,6 +9,7 @@ let }); in { nixpkgs.overlays = [ + (import inputs.emacs-overlay) # inputs.nix.overlay (self: super: rec { nix = super.nix // {