-
Notifications
You must be signed in to change notification settings - Fork 2
/
xest.nix
54 lines (48 loc) · 1.46 KB
/
xest.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xest;
oldPkgs = import (builtins.fetchGit {
url = "https://github.com/nixos/nixpkgs/";
ref = "refs/heads/nixos-20.09";
rev = "c5c6009fb436efe5732e07cd0e5692f495321752";
}) {config.allowUnfree = config.nixpkgs.config.allowUnfree;};
nixgl = import (builtins.fetchTarball https://github.com/guibou/nixGL/archive/master.tar.gz) {pkgs = oldPkgs;};
xest-package = import (builtins.fetchGit {
url = https://github.com/jhgarner/Xest-Window-Manager.git;
ref = "master";
}) {pkgs = oldPkgs;};
in {
options.services.xest = {
useIntel = mkOption {
type = types.bool;
default = false;
description = ''
When true, forces xest to use the mesa drives. Useful on Nvidia Optimus
devices that break the heuristic.
'';
};
};
# options.services.xest = {
# enable = mkOption {
# type = types.bool;
# default = false;
# description = ''
# When enabled, adds Xest to the list of desktop environments in your
# display manager.
# '';
# };
# };
config = {
services.xserver.windowManager.session = [{
name = "xest-git";
start = ''
${if cfg.useIntel then nixgl.nixGLCommon nixgl.nixGLIntel else nixgl.nixGLDefault}/bin/nixGL ${xest-package}/bin/xest-exe &
waitPID=$!
'';
}];
environment.etc.xest = {
source = "${xest-package}/config";
};
};
}