all repos — nixfiles @ 94eaea428f207a3791e60092c3ef2a4a6e2fb669

System and user configuration, managed by nix and home-manager

user-interface: Run emacs with --debug-init

Alan Pearce
commit

94eaea428f207a3791e60092c3ef2a4a6e2fb669

parent

45fcfe8435222078c2153f22b3f32d8bafb94633

1 file changed, 15 insertions(+), 13 deletions(-)

jump to
M modules/user-interface.nixmodules/user-interface.nix
@@ -1,8 +1,20 @@
-{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let pkgsUnstable = import <nixos-unstable> {}; # 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 @@
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;