Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make local-evaluation overridable at runtime #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GeoffreyFrogeye
Copy link
Contributor

@GeoffreyFrogeye GeoffreyFrogeye commented Apr 6, 2024

Also fixes a bug that should have been caught in #31 .

I'm not so sure about the variable name, most have the LP_ prefix but are undocumented, the only documented one (REBUILD_ACTION) doesn't have it. I went with what makes more sense to me (also, because I might actually remove the need for REBUILD_ACTION in my next PR nevermind) but it's up for debate (well, as is everything in a PR I guess).

The code as-is hasn't been completely tested, remote evaluation without #33 is failing for me because it's trying to find my local development copy of lollypops.

Due to a typo, SSH options would be ignored for `rebuild` when using
`lollypops.deployment.local-evaluation = true`,
`lollypops.deployment.sudo.enable = false`, and
`lollypops.deployment.ssh.opts`.
Since SSH options can be overriden at runtime, and having an empty
NIX_SSHOPTS doesn't seem to be an issue, I removed the Nix-time switch
altogether.
Adds an environment variable `LP_LOCAL_EVALUATION` which overrides
`lollypops.deployment.local-evaluation` at runtime.

Use case: Sometimes I'm deploying from my main workstation which is
more powerful than the servers, so building locally makes sense. Other
times I'm deploying from my crappy ARM laptop which is barely capable of
building itself. I'd like to switch from one to the other without having
to modify the flake of my system.
@GeoffreyFrogeye
Copy link
Contributor Author

(Removed debugging echo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant