From 290c1c8116cd70cc248cf4bb9458611a16c5694a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 27 Aug 2020 21:10:56 +0200 Subject: Use niv for tracking channel versions This way the config is actually reproducible without manually tracking supported nixpkgs states. home-manager is now not installed environment-wide anymore but only available inside a nix-shell. --- gui/emacs.nix | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'gui/emacs.nix') diff --git a/gui/emacs.nix b/gui/emacs.nix index ce5912b..a0cd3bd 100644 --- a/gui/emacs.nix +++ b/gui/emacs.nix @@ -1,6 +1,11 @@ -{ config, pkgs, ... }: +{ config, pkgs, sources, ... }: -{ +let + pkgs-unstable = import sources.nixpkgs-unstable { + overlays = [ (import sources.emacs-overlay) ]; + }; + +in { programs.emacs = let akr-color-theme = pkgs.stdenv.mkDerivation { name = "emacs-color-theme-akr"; @@ -44,27 +49,18 @@ in { enable = true; - package = let - pkgs-unstable = import { - overlays = [ - (import (builtins.fetchTarball { - url = https://github.com/nix-community/emacs-overlay/archive/c10d59874dfa8341237702bce514a763198770c4.tar.gz; - })) - ]; - }; - in - pkgs-unstable.emacsWithPackagesFromUsePackage { - config = ./conf/init.el; - package = pkgs-unstable.emacsGcc; - extraEmacsPackages = epkgs: with epkgs.melpaPackages; [ - pdf-tools - mu4e-alert - ] ++ [ - akr-color-theme - custom-runtime-env - pkgs.mu - ]; - }; + package = pkgs-unstable.emacsWithPackagesFromUsePackage { + config = ./conf/init.el; + package = pkgs-unstable.emacsGcc; + extraEmacsPackages = epkgs: with epkgs.melpaPackages; [ + pdf-tools + mu4e-alert + ] ++ [ + akr-color-theme + custom-runtime-env + pkgs.mu + ]; + }; }; home.packages = with pkgs; [ -- cgit v1.2.3