fix(service/hydra): remove restrict-eval and adjust settings
This commit is contained in:
parent
b2b2c8818b
commit
e4a8bd4417
|
@ -6,10 +6,23 @@
|
||||||
}: {
|
}: {
|
||||||
services.hydra = {
|
services.hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.hydra;
|
package = pkgs.hydra.overrideAttrs (old: {
|
||||||
notificationSender = "hydra@home";
|
patches =
|
||||||
hydraURL = "http://faunus-ater:${builtins.toString config.services.hydra.port}";
|
(
|
||||||
|
if old ? patches
|
||||||
|
then old.patches
|
||||||
|
else []
|
||||||
|
)
|
||||||
|
++ [
|
||||||
|
../../../patches/hydra-replace-restrict-with-pure-eval.patch
|
||||||
|
];
|
||||||
|
});
|
||||||
|
notificationSender = "hydra@hydra.tammena.me";
|
||||||
|
hydraURL = "https://hydra.tammena.me";
|
||||||
minimumDiskFree = 10;
|
minimumDiskFree = 10;
|
||||||
|
extraConfig = ''
|
||||||
|
evaluator_restrict_eval = false
|
||||||
|
'';
|
||||||
useSubstitutes = true;
|
useSubstitutes = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,9 +60,6 @@
|
||||||
Host *
|
Host *
|
||||||
StrictHostKeyChecking accept-new
|
StrictHostKeyChecking accept-new
|
||||||
'';
|
'';
|
||||||
nix.extraOptions = ''
|
|
||||||
allowed-uris = http: https: github
|
|
||||||
'';
|
|
||||||
|
|
||||||
systemd.services."hydra-initial-setup" = {
|
systemd.services."hydra-initial-setup" = {
|
||||||
description = "Setup hydra admin password once";
|
description = "Setup hydra admin password once";
|
||||||
|
|
13
patches/hydra-replace-restrict-with-pure-eval.patch
Normal file
13
patches/hydra-replace-restrict-with-pure-eval.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc
|
||||||
|
index 2794cc62..bd6416e9 100644
|
||||||
|
--- a/src/hydra-eval-jobs/hydra-eval-jobs.cc
|
||||||
|
+++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc
|
||||||
|
@@ -327,7 +327,7 @@ int main(int argc, char * * argv)
|
||||||
|
|
||||||
|
/* Prevent access to paths outside of the Nix search path and
|
||||||
|
to the environment. */
|
||||||
|
- evalSettings.restrictEval = true;
|
||||||
|
+ evalSettings.restrictEval = config->getBoolOption("evaluator_restrict_eval", true);
|
||||||
|
|
||||||
|
/* When building a flake, use pure evaluation (no access to
|
||||||
|
'getEnv', 'currentSystem' etc. */
|
Loading…
Reference in a new issue