test
This commit is contained in:
parent
ddec7ebe50
commit
f3f8022aa3
@ -79,8 +79,6 @@ in
|
|||||||
SYSTANT_PUBLISH_INTERVAL = toString cfg.publishInterval;
|
SYSTANT_PUBLISH_INTERVAL = toString cfg.publishInterval;
|
||||||
# Override RELEASE_COOKIE to bypass file reading
|
# Override RELEASE_COOKIE to bypass file reading
|
||||||
RELEASE_COOKIE = "systant-bypass-cookie";
|
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
|
# Set log level to debug for troubleshooting
|
||||||
SYSTANT_LOG_LEVEL = "debug";
|
SYSTANT_LOG_LEVEL = "debug";
|
||||||
};
|
};
|
||||||
@ -95,6 +93,8 @@ in
|
|||||||
StandardError = "journal";
|
StandardError = "journal";
|
||||||
SyslogIdentifier = "systant";
|
SyslogIdentifier = "systant";
|
||||||
WorkingDirectory = "${cfg.package}";
|
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
|
# Get current environment
|
||||||
env = System.get_env()
|
env = System.get_env()
|
||||||
|
|
||||||
# Ensure we have a proper PATH that includes system binaries
|
# Start with current environment
|
||||||
system_path = "/run/current-system/sw/bin:/usr/local/bin:/usr/bin:/bin"
|
enhanced_env = env
|
||||||
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)
|
|
||||||
|
|
||||||
# If running as root, add Wayland session environment for user commands
|
# If running as root, add Wayland session environment for user commands
|
||||||
if System.get_env("USER") == "root" do
|
if System.get_env("USER") == "root" do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user