From 7ca55c3fd5bb3434c4e1f5b30821a5d1a56fbced Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 15 Nov 2017 18:34:39 +0100 Subject: feat(desktop): Move from i3 to exwm Emacs just controls everything now. Why not! Rather than using the builtin NixOS support for EXWM I've added a custom snippet that takes care of the launching. This assumes that the user launching the session has my emacs configuration installed, which I, in practice, always do. * remove setup of i3wm (until I'm comfortable using exwm I will keep the i3 configuration files around) * disable compton (exwm brings its own compositor) * disable auto-starting of emacs user service * enable & configure exwm (also see correlating commits in my emacs.d repository) --- desktop.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'desktop.nix') diff --git a/desktop.nix b/desktop.nix index 284789dec5a6..12149a07288a 100644 --- a/desktop.nix +++ b/desktop.nix @@ -1,6 +1,6 @@ # Configuration for the desktop environment -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: let wallpapers = import ./pkgs/wallpapers.nix; in { @@ -9,18 +9,19 @@ in { enable = true; layout = "us,no"; xkbOptions = "caps:super, grp:shifts_toggle"; - }; - # configure desktop environment: - services.xserver.windowManager.i3 = { - enable = true; - configFile = "/etc/i3/config"; + # Give EXWM permission to control the session. + displayManager.sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER"; }; - services.compton.enable = true; - # this should be the default! in fact, it will soon be: - # https://github.com/NixOS/nixpkgs/pull/30486 - services.compton.backend = "xrender"; + # Configure desktop environment: + services.xserver.windowManager.session = lib.singleton { + name = "exwm"; + start = '' + ${pkgs.emacs}/bin/emacs --daemon -f exwm-enable + emacsclient -c + ''; + }; # Configure Redshift for Oslo services.redshift = { -- cgit 1.4.1