blob: 0993e81b998d63147ecf6d88c219e120a7727646 (
plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
{ config, lib, pkgs, ... }:
let
cfg = config.programs.dockd;
in
{
options = {
programs.dockd = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
ThinkPad dock manager daemon.
'';
};
};
};
config = lib.mkIf (cfg.enable) {
environment.etc = {
"dockd/docked.conf".text = ''
[Screen]
height=1080
width=3840
mm_height=311
mm_width=1041
[CRTC]
crtc=63
x=0
y=0
rotation=1
mode=1920x1080
outputs_len=1
outputs_0=HDMI3
[CRTC]
crtc=64
x=1920
y=0
rotation=1
mode=1920x1080
outputs_len=1
outputs_0=DP2
[CRTC]
crtc=65
x=0
y=0
rotation=1
mode=None
outputs_len=0
'';
"dockd/undocked.conf".text = ''
[Screen]
height=768
width=1366
mm_height=201
mm_width=359
[CRTC]
crtc=63
x=0
y=0
rotation=1
mode=1366x768
outputs_len=1
outputs_0=LVDS1
[CRTC]
crtc=64
x=1920
y=0
rotation=1
mode=None
outputs_len=0
[CRTC]
crtc=65
x=0
y=0
rotation=1
mode=None
outputs_len=0
'';
};
};
}
|