{ lib, config, pkgs, ... }: let scriptPath = ./assets/scripts/start_script.sh; scriptExists = lib.fileExists "${scriptPath}"; in { system.activationScripts.startScript = lib.mkIf scriptExists { text = '' ${scriptPath} ''; defer = false; # Run as early as possible }; }