Skip to content

Commit

Permalink
atuin: Prepare for daemon socket path in 18.4.0
Browse files Browse the repository at this point in the history
The path is changing in 18.4.0 to XDG_RUNTIME_DIR over XDG_DATA_DIR so
update the specifier. See atuinsh/atuin#2171.
  • Loading branch information
mmlb committed Dec 9, 2024
1 parent 77a792a commit e952e94
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/programs/atuin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,16 @@ in {
};
};

systemd.user.sockets.atuin-daemon = {
systemd.user.sockets.atuin-daemon = let
socket_dir = if versionAtLeast cfg.package.version "18.4.0" then
"%t"
else
"%D/atuin";
in {
Unit = { Description = "Atuin daemon socket"; };
Install = { WantedBy = [ "sockets.target" ]; };
Socket = {
ListenStream = "%D/atuin/atuin.sock";
ListenStream = "${socket_dir}/atuin.sock";
SocketMode = "0600";
RemoveOnStop = true;
};
Expand Down

0 comments on commit e952e94

Please sign in to comment.