about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configuration.nix2
-rw-r--r--desktop.nix21
2 files changed, 12 insertions, 11 deletions
diff --git a/configuration.nix b/configuration.nix
index 899735e05d4d..0553c8cf4e4c 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -26,7 +26,7 @@
 
   # Configure emacs:
   # (actually, that's a lie, this only installs emacs!)
-  services.emacs.enable = true;
+  services.emacs.install = true;
   services.emacs.defaultEditor = true;
 
   # Enable GNOME keyring (required for Evolution)
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 = {