test
This commit is contained in:
parent
ddec7ebe50
commit
f3f8022aa3
@ -79,8 +79,6 @@ in
|
||||
SYSTANT_PUBLISH_INTERVAL = toString cfg.publishInterval;
|
||||
# Override RELEASE_COOKIE to bypass file reading
|
||||
RELEASE_COOKIE = "systant-bypass-cookie";
|
||||
# Set proper PATH for NixOS
|
||||
PATH = "/run/current-system/sw/bin:/run/wrappers/bin:\${PATH}";
|
||||
# Set log level to debug for troubleshooting
|
||||
SYSTANT_LOG_LEVEL = "debug";
|
||||
};
|
||||
@ -95,6 +93,8 @@ in
|
||||
StandardError = "journal";
|
||||
SyslogIdentifier = "systant";
|
||||
WorkingDirectory = "${cfg.package}";
|
||||
# Import environment from user session
|
||||
ExecStartPre = "${pkgs.systemd}/bin/systemctl --user import-environment PATH XDG_RUNTIME_DIR WAYLAND_DISPLAY";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -199,13 +199,8 @@ defmodule Systant.CommandExecutor do
|
||||
# Get current environment
|
||||
env = System.get_env()
|
||||
|
||||
# Ensure we have a proper PATH that includes system binaries
|
||||
system_path = "/run/current-system/sw/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
current_path = Map.get(env, "PATH", "")
|
||||
full_path = if current_path == "", do: system_path, else: "#{current_path}:#{system_path}"
|
||||
|
||||
# Start with enhanced environment
|
||||
enhanced_env = Map.put(env, "PATH", full_path)
|
||||
# Start with current environment
|
||||
enhanced_env = env
|
||||
|
||||
# If running as root, add Wayland session environment for user commands
|
||||
if System.get_env("USER") == "root" do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user