From 1646eed8ce0c4bf232e09665f2d77281662e3be8 Mon Sep 17 00:00:00 2001 From: Varun Narravula Date: Tue, 1 Oct 2024 23:22:58 -0700 Subject: [PATCH] fix(atuin): remove zfs workarounds, use daemon --- home/profiles/base/atuin.nix | 20 +++++++++++++++++++ .../CharlesWoodson/hardware-configuration.nix | 8 -------- .../hardware-configuration.nix | 8 -------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/home/profiles/base/atuin.nix b/home/profiles/base/atuin.nix index 5a6a4ff6..bb995bd5 100644 --- a/home/profiles/base/atuin.nix +++ b/home/profiles/base/atuin.nix @@ -5,6 +5,8 @@ ... }: let inherit (pkgs.stdenv) isLinux; + + atuinCfg = config.programs.atuin; in lib.mkMerge [ { @@ -19,6 +21,9 @@ in enter_accept = "false"; common_subcommands = ["nixos"]; common_prefix = ["sudo"]; + daemon = { + enabled = true; + }; }; }; programs.zsh.initExtra = '' @@ -31,5 +36,20 @@ in ".local/share/atuin" ]; }; + + systemd.user.services.atuind = { + Unit = { + Description = "atuin daemon"; + }; + Install = { + WantedBy = ["default.target"]; + }; + Service = { + ExecStart = "${atuinCfg.package}/bin/atuin daemon"; + Restart = "on-failure"; + RestartSec = 1; + Environment = ["ATUIN_LOG=info"]; + }; + }; }) ] diff --git a/hosts/nixos/machines/CharlesWoodson/hardware-configuration.nix b/hosts/nixos/machines/CharlesWoodson/hardware-configuration.nix index fbc4c398..341f4392 100644 --- a/hosts/nixos/machines/CharlesWoodson/hardware-configuration.nix +++ b/hosts/nixos/machines/CharlesWoodson/hardware-configuration.nix @@ -62,14 +62,6 @@ options = ["size=4G" "mode=777"]; }; - # Disabled sync in this dataset so atuin can run faster. - # Synchronous writes go brr: https://github.com/atuinsh/atuin/issues/952 - "/persist/home/varun/.local/share/atuin" = { - device = "locker/persist/varun-atuin"; - fsType = "zfs"; - neededForBoot = true; - }; - "/etc/ssh" = { depends = ["/persist"]; neededForBoot = true; diff --git a/hosts/nixos/machines/SebastianJanikowski/hardware-configuration.nix b/hosts/nixos/machines/SebastianJanikowski/hardware-configuration.nix index 12f4fe45..2fd09035 100644 --- a/hosts/nixos/machines/SebastianJanikowski/hardware-configuration.nix +++ b/hosts/nixos/machines/SebastianJanikowski/hardware-configuration.nix @@ -57,14 +57,6 @@ options = ["size=4G" "mode=777"]; }; - # Disabled sync in this dataset so atuin can run faster. - # Synchronous writes go brr: https://github.com/atuinsh/atuin/issues/952 - "/persist/home/varun/.local/share/atuin" = { - device = "locker/persist/varun-atuin"; - fsType = "zfs"; - neededForBoot = true; - }; - "/etc/ssh" = { depends = ["/persist"]; neededForBoot = true;