From 94eaea428f207a3791e60092c3ef2a4a6e2fb669 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 10 Sep 2017 14:38:36 +0200 Subject: user-interface: Run emacs with --debug-init --- modules/user-interface.nix | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'modules/user-interface.nix') diff --git a/modules/user-interface.nix b/modules/user-interface.nix index 3f4fb6e..d8a2b6a 100644 --- a/modules/user-interface.nix +++ b/modules/user-interface.nix @@ -1,8 +1,20 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let pkgsUnstable = import {}; # pkgsUnstable = pkgs; + emacsPackage = import ../packages/emacs.nix { + inherit (pkgs) stdenv; + pkgs = pkgsUnstable; + emacs = pkgs.lib.overrideDerivation (pkgs.emacs.override { + withGTK2 = false; + withGTK3 = true; + }) (attrs: { + postInstall = attrs.postInstall + '' + rm $out/share/applications/emacs.desktop + ''; + }); + }; in { # programs.browserpass.enable = true; programs.info.enable = true; @@ -49,19 +61,9 @@ in services.emacs = { enable = true; defaultEditor = true; - package = import ../packages/emacs.nix { - inherit (pkgs) stdenv; - pkgs = pkgsUnstable; - emacs = pkgs.lib.overrideDerivation (pkgs.emacs.override { - withGTK2 = false; - withGTK3 = true; - }) (attrs: { - postInstall = attrs.postInstall + '' - rm $out/share/applications/emacs.desktop - ''; - }); - }; + package = emacsPackage; }; + systemd.user.services.emacs.serviceConfig.ExecStart = lib.mkForce "${pkgs.bash}/bin/bash -c 'source ${config.system.build.setEnvironment}; exec ${emacsPackage}/bin/emacs --daemon --debug-init'"; services.redshift = { enable = true; -- cgit 1.4.1