From 60c436fec31511561e013592caa577cc5f3461da Mon Sep 17 00:00:00 2001
From: tv <tv@krebsco.de>
Date: Tue, 5 Dec 2017 15:34:31 +0100
Subject: [PATCH] tv xserver: user -> cfg.user

---
 tv/2configs/xserver/default.nix | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
index 8f3ee5966..6688984e2 100644
--- a/tv/2configs/xserver/default.nix
+++ b/tv/2configs/xserver/default.nix
@@ -1,7 +1,9 @@
 { config, pkgs, ... }@args:
 with import <stockholm/lib>;
 let
-  user = config.krebs.build.user;
+  cfg = {
+    user = config.krebs.build.user;
+  };
 in {
 
   environment.systemPackages = [
@@ -25,7 +27,7 @@ in {
     group = "wheel";
     envp = {
       DISPLAY = ":${toString config.services.xserver.display}";
-      USER = user.name;
+      USER = cfg.user.name;
     };
   };
 
@@ -81,8 +83,8 @@ in {
       SyslogIdentifier = "xmonad";
       ExecStart = "${pkgs.xmonad-tv}/bin/xmonad";
       ExecStop = "${pkgs.xmonad-tv}/bin/xmonad --shutdown";
-      User = user.name;
-      WorkingDirectory = user.home;
+      User = cfg.user.name;
+      WorkingDirectory = cfg.user.home;
     };
   };
 
@@ -125,7 +127,7 @@ in {
       Restart = "always";
       RestartSec = "2s";
       StartLimitBurst = 0;
-      User = user.name;
+      User = cfg.user.name;
     };
   };
 }