From 44cdb9227eea5c0d80d78fa8140884ae61f989c5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 18 Jan 2018 19:38:56 +0100 Subject: l baseX: run xmonad as user service --- lass/2configs/baseX.nix | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 65e8f15a4..5cb7eb03f 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -106,15 +106,40 @@ in { xlibs.fontschumachermisc ]; - lass.xserver.enable = true; + #lass.xserver.enable = true; services.xserver = { + enable = true; layout = "us"; + display = mkForce 0; xkbModel = "evdev"; xkbVariant = "altgr-intl"; xkbOptions = "caps:backspace"; + displayManager.lightdm.enable = true; + windowManager.default = "xmonad"; + windowManager.session = [{ + name = "xmonad"; + start = '' + ${pkgs.xorg.xhost}/bin/xhost +LOCAL: + ${pkgs.coreutils}/bin/sleep infinity + ''; + }]; + }; + + systemd.user.services.xmonad = { + wantedBy = [ "graphical-session.target" ]; + environment = { + DISPLAY = ":${toString config.services.xserver.display}"; + RXVT_SOCKET = "%t/urxvtd-socket"; + XMONAD_DATA_DIR = "/tmp"; + }; + serviceConfig = { + SyslogIdentifier = "xmonad"; + ExecStart = "${pkgs.xmonad-lass}/bin/xmonad"; + ExecStop = "${pkgs.xmonad-lass}/bin/xmonad --shutdown"; + }; + restartIfChanged = false; }; - services.urxvtd.enable = true; krebs.xresources.enable = true; lass.screenlock.enable = true; } -- cgit v1.2.3