{ pkgs, lib, ... }: let format = pkgs.formats.toml { }; package = pkgs.ra-multiplex; in { xdg.configFile."ra-multiplex/config.toml".source = format.generate "ra-multiplex-config.toml" { # listen = "/var/run/user/1001/ra-mux/ra-multiplex.sock"; # connect = "/var/run/user/1001/ra-mux/ra-multiplex.sock"; listen = [ "127.0.0.1" 27631 ]; connect = [ "127.0.0.1" 27631 ]; pass_environment = [ "RUST_SRC_PATH" "RUSTC_WRAPPER" "SCCACHE_DIR" ]; }; systemd.user.services.ra-multiplex = { Unit = { Description = "Rust analyzer multiplex server"; }; Service = { Type = "simple"; ExecStart = "${lib.getExe package} server"; Environment = [ "PATH=${lib.makeBinPath [ pkgs.rust-analyzer ]}" ]; }; Install = { WantedBy = [ "default.target" ]; }; }; }