From b97907ebcd0e08780117d72a5d8d8f0244d4e271 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Mon, 4 Nov 2024 11:20:28 +0100 Subject: [PATCH] Fix atuin when the system doesn't power off properly --- hmModules/shell/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hmModules/shell/default.nix b/hmModules/shell/default.nix index 22ced2b..048a65f 100644 --- a/hmModules/shell/default.nix +++ b/hmModules/shell/default.nix @@ -3,6 +3,7 @@ pkgs, age, hostname, + config, ... }: { @@ -47,13 +48,19 @@ Install = { WantedBy = [ "default.target" ]; }; - Service.ExecStart = "${lib.getExe pkgs.atuin} daemon"; + Service = { + # ExecStartPre = "${lib.getExe' pkgs.toybox "rm"} -f ${config.programs.atuin.settings.daemon.socket_path}"; + ExecStart = "${lib.getExe pkgs.atuin} daemon"; + }; }; programs.atuin = { enable = true; settings = { - daemon.enabled = true; + daemon = { + enabled = true; + socket_path = "/home/ccr/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289 + }; auto_sync = true; sync_frequency = "5m"; sync_address = "http://sisko.fleet:8889";