Refactor template: extract scripts, overlays, and hosts into separate modules

Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-11 19:26:17 +00:00
commit 3398a72241
17 changed files with 1185 additions and 422 deletions

View file

@ -0,0 +1,34 @@
# Julia-related host configurations
config: pkgs: {
jl = {
enable = config.enabledLanguages.julia;
path = {
value = "${pkgs.julia-bin}/bin/julia";
args = ["--add-flags" "--project=."];
};
};
initJl = {
enable = config.enabledLanguages.julia;
path = {
value = "${pkgs.julia-bin}/bin/julia";
args = ["--add-flags" "--project=. -e 'using Pkg; Pkg.instantiate(); Pkg.add(\"Pluto\")'"];
};
};
pluto = let
runPluto = ''
import Pkg; import TOML; Pkg.instantiate();
if !isfile("Project.toml") || !haskey(TOML.parsefile(Base.active_project())["deps"], "Pluto")
Pkg.add("Pluto");
end
import Pluto; Pluto.run();
'';
in {
enable = config.enabledLanguages.julia;
path = {
value = "${pkgs.julia-bin}/bin/julia";
args = ["--add-flags" "--project=. -e '${runPluto}'"];
};
};
}