nixos/evilwm: allow enabling evilwm through services.xserver.windowManager.evilwm.*

This commit is contained in:
Andreas Wiese 2017-11-20 07:31:35 +01:00
parent 905b7a6e73
commit f5f601a7f2

View File

@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.evilwm;
in
{
###### interface
options = {
services.xserver.windowManager.evilwm.enable = mkEnableOption "evilwm";
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "evilwm";
start = ''
${pkgs.evilwm}/bin/evilwm &
waitPID=$!
'';
};
environment.systemPackages = [ pkgs.evilwm ];
};
}