File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,16 @@ in {
178178 description = lib . mdDoc "List of plugins to install." ;
179179 example = lib . literalExpression "[ pkgs.tmuxPlugins.nord ]" ;
180180 } ;
181+
182+ withUtempter = mkOption {
183+ description = lib . mdDoc ''
184+ Whether to enable libutempter for tmux.
185+ This is required so that tmux can write to /var/run/utmp (which can be queried with `who` to display currently connected user sessions).
186+ Note, this will add a guid wrapper for the group utmp!
187+ '' ;
188+ default = true ;
189+ type = types . bool ;
190+ } ;
181191 } ;
182192 } ;
183193
@@ -193,6 +203,15 @@ in {
193203 TMUX_TMPDIR = lib . optional cfg . secureSocket '''' ${XDG_RUNTIME_DIR:-"/run/user/$(id -u)"}'' ;
194204 } ;
195205 } ;
206+ security . wrappers = mkIf cfg . withUtempter {
207+ utempter = {
208+ source = "${ pkgs . libutempter } /lib/utempter/utempter" ;
209+ owner = "root" ;
210+ group = "utmp" ;
211+ setuid = false ;
212+ setgid = true ;
213+ } ;
214+ } ;
196215 } ;
197216
198217 imports = [
You can’t perform that action at this time.
0 commit comments