From f020338056474c396019f01b7fae6ff0ce4f58c0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 9 Nov 2021 15:32:59 +0100 Subject: [PATCH] home: tmux: remove tmux service Turns out it is more trouble than it is worth trying to make this work: with the secure socket problem etc... The first start up is fast enough for me in the end. This reverts commit cc21d84808dfd79736b3c44e72ea2c3a8e1476a6. --- home/tmux/default.nix | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/home/tmux/default.nix b/home/tmux/default.nix index c9ccf16..ac2e1d2 100644 --- a/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -5,10 +5,6 @@ in { options.my.home.tmux = with lib.my; { enable = mkDisableOption "tmux terminal multiplexer"; - - service = { - enable = mkDisableOption "tmux server service"; - }; }; config.programs.tmux = lib.mkIf cfg.enable { @@ -50,30 +46,4 @@ in bind-key -Tcopy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-toggle ''; }; - - config.systemd.user.services.tmux = lib.mkIf cfg.service.enable { - Unit = { - Description = "tmux server"; - }; - - Install = { - WantedBy = [ "default.target" ]; - }; - - Service = - let - # Wrap `tmux` in a login shell and set the socket path - tmuxCmd = "${config.programs.tmux.package}/bin/tmux"; - socketExport = lib.optionalString - config.programs.tmux.secureSocket - ''export TMUX_TMPDIR=''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"};''; - mkTmuxCommand = - c: "${pkgs.runtimeShell} -l -c '${socketExport} ${tmuxCmd} ${c}'"; - in - { - Type = "forking"; - ExecStart = mkTmuxCommand "new -d -s ambroisie"; - ExecStop = mkTmuxCommand "kill-server"; - }; - }; }