aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client
diff options
context:
space:
mode:
Diffstat (limited to 'crates/atuin-client')
-rw-r--r--crates/atuin-client/config.toml5
-rw-r--r--crates/atuin-client/src/settings.rs5
2 files changed, 10 insertions, 0 deletions
diff --git a/crates/atuin-client/config.toml b/crates/atuin-client/config.toml
index 49e06c45..4938991a 100644
--- a/crates/atuin-client/config.toml
+++ b/crates/atuin-client/config.toml
@@ -223,5 +223,10 @@ records = true
## windows: Not Supported
# socket_path = "~/.local/share/atuin/atuin.sock"
+## Use systemd socket activation rather than opening the given path (the path must still be correct for the client)
+## linux: false
+## mac/windows: Not Supported
+# systemd_socket = false
+
## The port that should be used for TCP on non unix systems
# tcp_port = 8889
diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs
index a97d05eb..f4434e41 100644
--- a/crates/atuin-client/src/settings.rs
+++ b/crates/atuin-client/src/settings.rs
@@ -350,6 +350,9 @@ pub struct Daemon {
/// The path to the unix socket used by the daemon
pub socket_path: String,
+ /// Use a socket passed via systemd's socket activation protocol, instead of the path
+ pub systemd_socket: bool,
+
/// The port that should be used for TCP on non unix systems
pub tcp_port: u64,
}
@@ -368,6 +371,7 @@ impl Default for Daemon {
enabled: false,
sync_frequency: 300,
socket_path: "".to_string(),
+ systemd_socket: false,
tcp_port: 8889,
}
}
@@ -715,6 +719,7 @@ impl Settings {
.set_default("daemon.sync_frequency", 300)?
.set_default("daemon.enabled", false)?
.set_default("daemon.socket_path", socket_path.to_str())?
+ .set_default("daemon.systemd_socket", false)?
.set_default("daemon.tcp_port", 8889)?
.set_default(
"prefers_reduced_motion",