tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/oblogout: drop module
worldofpeace
6 years ago
c158ad48
5f4b9806
+3
-168
1 changed file
expand all
collapse all
unified
split
nixos
modules
programs
oblogout.nix
+3
-168
nixos/modules/programs/oblogout.nix
···
1
1
-
# Global configuration for oblogout.
2
2
-
3
1
{ config, lib, pkgs, ... }:
4
2
5
3
with lib;
6
4
7
7
-
let cfg = config.programs.oblogout;
8
8
-
9
9
-
in
10
5
{
11
11
-
###### interface
12
6
13
13
-
options = {
14
14
-
15
15
-
programs.oblogout = {
16
16
-
17
17
-
enable = mkOption {
18
18
-
type = types.bool;
19
19
-
default = false;
20
20
-
description = ''
21
21
-
Whether to install OBLogout and create <filename>/etc/oblogout.conf</filename>.
22
22
-
See <filename>${pkgs.oblogout}/share/doc/README</filename>.
23
23
-
'';
24
24
-
};
25
25
-
26
26
-
opacity = mkOption {
27
27
-
type = types.int;
28
28
-
default = 70;
29
29
-
description = ''
30
30
-
Opacity percentage of Cairo rendered backgrounds.
31
31
-
'';
32
32
-
};
33
33
-
34
34
-
bgcolor = mkOption {
35
35
-
type = types.str;
36
36
-
default = "black";
37
37
-
description = ''
38
38
-
Colour name or hex code (#ffffff) of the background color.
39
39
-
'';
40
40
-
};
41
41
-
42
42
-
buttontheme = mkOption {
43
43
-
type = types.str;
44
44
-
default = "simplistic";
45
45
-
description = ''
46
46
-
Icon theme for the buttons, must be in the themes folder of
47
47
-
the package, or in
48
48
-
<filename>~/.themes/<name>/oblogout/</filename>.
49
49
-
'';
50
50
-
};
51
51
-
52
52
-
buttons = mkOption {
53
53
-
type = types.str;
54
54
-
default = "cancel, logout, restart, shutdown, suspend, hibernate";
55
55
-
description = ''
56
56
-
List and order of buttons to show.
57
57
-
'';
58
58
-
};
59
59
-
60
60
-
cancel = mkOption {
61
61
-
type = types.str;
62
62
-
default = "Escape";
63
63
-
description = ''
64
64
-
Cancel logout/shutdown shortcut.
65
65
-
'';
66
66
-
};
7
7
+
imports = [
8
8
+
(mkRemovedOptionModule [ "programs" "oblogout" ] "programs.oblogout has been removed from NixOS. This is because the oblogout repository has been archived upstream.")
9
9
+
];
67
10
68
68
-
shutdown = mkOption {
69
69
-
type = types.str;
70
70
-
default = "S";
71
71
-
description = ''
72
72
-
Shutdown shortcut.
73
73
-
'';
74
74
-
};
75
75
-
76
76
-
restart = mkOption {
77
77
-
type = types.str;
78
78
-
default = "R";
79
79
-
description = ''
80
80
-
Restart shortcut.
81
81
-
'';
82
82
-
};
83
83
-
84
84
-
suspend = mkOption {
85
85
-
type = types.str;
86
86
-
default = "U";
87
87
-
description = ''
88
88
-
Suspend shortcut.
89
89
-
'';
90
90
-
};
91
91
-
92
92
-
logout = mkOption {
93
93
-
type = types.str;
94
94
-
default = "L";
95
95
-
description = ''
96
96
-
Logout shortcut.
97
97
-
'';
98
98
-
};
99
99
-
100
100
-
lock = mkOption {
101
101
-
type = types.str;
102
102
-
default = "K";
103
103
-
description = ''
104
104
-
Lock session shortcut.
105
105
-
'';
106
106
-
};
107
107
-
108
108
-
hibernate = mkOption {
109
109
-
type = types.str;
110
110
-
default = "H";
111
111
-
description = ''
112
112
-
Hibernate shortcut.
113
113
-
'';
114
114
-
};
115
115
-
116
116
-
clogout = mkOption {
117
117
-
type = types.str;
118
118
-
default = "openbox --exit";
119
119
-
description = ''
120
120
-
Command to logout.
121
121
-
'';
122
122
-
};
123
123
-
124
124
-
clock = mkOption {
125
125
-
type = types.str;
126
126
-
default = "";
127
127
-
description = ''
128
128
-
Command to lock screen.
129
129
-
'';
130
130
-
};
131
131
-
132
132
-
cswitchuser = mkOption {
133
133
-
type = types.str;
134
134
-
default = "";
135
135
-
description = ''
136
136
-
Command to switch user.
137
137
-
'';
138
138
-
};
139
139
-
};
140
140
-
};
141
141
-
142
142
-
###### implementation
143
143
-
144
144
-
config = mkIf cfg.enable {
145
145
-
environment.systemPackages = [ pkgs.oblogout ];
146
146
-
147
147
-
environment.etc."oblogout.conf".text = ''
148
148
-
[settings]
149
149
-
usehal = false
150
150
-
151
151
-
[looks]
152
152
-
opacity = ${toString cfg.opacity}
153
153
-
bgcolor = ${cfg.bgcolor}
154
154
-
buttontheme = ${cfg.buttontheme}
155
155
-
buttons = ${cfg.buttons}
156
156
-
157
157
-
[shortcuts]
158
158
-
cancel = ${cfg.cancel}
159
159
-
shutdown = ${cfg.shutdown}
160
160
-
restart = ${cfg.restart}
161
161
-
suspend = ${cfg.suspend}
162
162
-
logout = ${cfg.logout}
163
163
-
lock = ${cfg.lock}
164
164
-
hibernate = ${cfg.hibernate}
165
165
-
166
166
-
[commands]
167
167
-
shutdown = systemctl poweroff
168
168
-
restart = systemctl reboot
169
169
-
suspend = systemctl suspend
170
170
-
hibernate = systemctl hibernate
171
171
-
logout = ${cfg.clogout}
172
172
-
lock = ${cfg.clock}
173
173
-
switchuser = ${cfg.cswitchuser}
174
174
-
'';
175
175
-
};
176
11
}