From 1dad75f72afabe18a56df7275f54bba187257042 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Fri, 6 Jul 2018 15:06:00 +0000 Subject: [PATCH] Define xmonad config, disable red border --- nix/base.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nix/base.nix b/nix/base.nix index fee8f6a..2da082a 100644 --- a/nix/base.nix +++ b/nix/base.nix @@ -23,4 +23,24 @@ extraGroups = [ "audio" ]; createHome = true; }; + + environment.etc."xmonad.hs".text = '' +import XMonad +main = xmonad defaultConfig + { workspaces = [ "" ] + , borderWidth = 0 + } + ''; + + systemd.services.home-user-build-xmonad = { + description = "Create and xmonad configuration"; + serviceConfig = { + ConditionFileNotEmpty = "!/home/user/.xmonad/xmonad.hs"; + ExecStart = "/bin/sh -c 'mkdir /home/user/.xmonad && cp /etc/xmonad.hs /home/user/.xmonad/xmonad.hs'"; + RemainAfterExit = "yes"; + Type = "oneshot"; + User = "user"; + }; + wantedBy = [ "multi-user.target" ]; + }; }