hydra: wip init
Some checks failed
/ test (push) Has been cancelled

This commit is contained in:
Christoph Hollizeck 2024-12-30 09:38:57 +01:00
parent daa9b33754
commit d57aa54233
3 changed files with 17 additions and 10 deletions

View file

@ -150,12 +150,13 @@
systems.hosts.wsl.modules = with inputs; [ nixos-wsl.nixosModules.default ]; systems.hosts.wsl.modules = with inputs; [ nixos-wsl.nixosModules.default ];
} }
// { // rec {
self = inputs.self; self = inputs.self;
hydraJobs = { hydraJobs = {
loptland = inputs.self.nixosConfigurations.loptland.config.system.build.toplevel; hosts = lib.mapAttrs (_: cfg: cfg.config.system.build.toplevel) (
yggdrasil = inputs.self.nixosConfigurations.yggdrasil.config.system.build.toplevel; lib.filterAttrs (name: cfg: name != "nixberry") self.outputs.nixosConfigurations
);
}; };
}; };
} }

View file

@ -56,7 +56,7 @@ in
users = [ users = [
"root" "root"
config.${namespace}.user.name config.${namespace}.user.name
] ++ optional config.services.hydra.enable "hydra"; ] ++ optional config.services.hydra.enable "hydra hydra-evaluator hydra-queue-runner";
in in
{ {
package = cfg.package; package = cfg.package;
@ -71,6 +71,7 @@ in
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = users; trusted-users = users;
allowed-users = users; allowed-users = users;
allowed-uris = "github: https://github.com/ git+https://github.com/ gitlab: https://gitlab.com/ git+https://gitlab.com/";
substituters = [ substituters = [
cfg.default-substituter.url cfg.default-substituter.url
] ++ (mapAttrsToList (name: value: name) cfg.extra-substituters); ] ++ (mapAttrsToList (name: value: name) cfg.extra-substituters);
@ -83,10 +84,6 @@ in
keep-derivations = true; keep-derivations = true;
}); });
extraOptions = ''
allowed-uris = https://github.com/ https://git.christophhollizeck.dev/
'';
gc = { gc = {
automatic = true; automatic = true;
dates = "daily"; dates = "daily";

View file

@ -82,6 +82,15 @@ in
return = "404"; return = "404";
}; };
}; };
"_" = {
forceSSL = cfg.enableAcme;
useACMEHost = mkIf cfg.enableAcme domainName;
locations."/" = {
return = "404";
};
};
}; };
}; };
@ -133,8 +142,8 @@ in
services.hydra = { services.hydra = {
enable = true; enable = true;
hydraURL = "http://localhost:2000"; hydraURL = "http://localhost:${toString hydraPort}";
port = 2000; port = hydraPort;
notificationSender = "hydra@localhost"; notificationSender = "hydra@localhost";
buildMachinesFiles = [ ]; buildMachinesFiles = [ ];
useSubstitutes = true; useSubstitutes = true;