From a63dc8a9e5f9cad50f4ea7c6c5d2ed544bc70656 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Sun, 11 Jan 2026 21:21:14 +0000 Subject: fix(nix): add coreutils to PATH and use absolute path for cat in nsec file reading - Add coreutils to systemd service PATH so cat command is available - Use absolute path for cat in ExecStart for reliability - Fixes startup panic: relay_owner_keys should be available: Invalid relay_owner_nsec - Fixes: cat: command not found error in systemd logs This ensures the nsec file can be read properly during service startup, allowing the sync manager to initialize correctly with relay owner authentication. --- nix/module.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nix/module.nix b/nix/module.nix index d820b67..79b0e83 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -239,13 +239,14 @@ let # Working directory where .relay-owner.nsec will be created if needed WorkingDirectory = cfg.dataDir; - # Add git to PATH for purgatory sync operations - Environment = "PATH=${pkgs.git}/bin:${pkgs.openssh}/bin"; + # Add git, openssh, and coreutils to PATH for purgatory sync operations + Environment = + "PATH=${pkgs.git}/bin:${pkgs.openssh}/bin:${pkgs.coreutils}/bin"; # Command to run ExecStart = if cfg.relayOwnerNsecFile != null then # Use nsec from file - need to use shell to read the file - "${pkgs.bash}/bin/bash -c '${ngit-grasp}/bin/ngit-grasp --relay-owner-nsec \"$(cat ${cfg.relayOwnerNsecFile})\"'" + "${pkgs.bash}/bin/bash -c '${ngit-grasp}/bin/ngit-grasp --relay-owner-nsec \"$(${pkgs.coreutils}/bin/cat ${cfg.relayOwnerNsecFile})\"'" else # Let ngit-grasp auto-generate nsec in .relay-owner.nsec file in dataDir "${ngit-grasp}/bin/ngit-grasp"; -- cgit v1.2.3