Trying hydra

This commit is contained in:
Julien Malka 2021-12-17 18:59:35 +01:00
parent cbad0e756a
commit 8293c6593e
3 changed files with 25 additions and 1 deletions

View file

@ -31,6 +31,9 @@
(builtins.attrNames (builtins.readDir ./modules)));
nixosConfigurations = builtins.mapAttrs (name: value: (mkMachine name value self.nixosModules)) (importConfig ./machines);
hydraJobs = (nixpkgs.lib.mapAttrs' (name: config:
nixpkgs.lib.nameValuePair "nixos-${name}"
config.config.system.build.toplevel) self.nixosConfigurations);
};
}

View file

@ -14,7 +14,28 @@ in
};
};
services.hydra = {
enable = true;
hydraURL = "https://hydra.julienmalka.me"; # externally visible URL
notificationSender = "hydra@localhost"; # e-mail of hydra service
port = 9876; # Default
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
buildMachinesFiles = [ ];
# you will probably also want, otherwise *everything* will be built from scratch
useSubstitutes = true;
};
services.nginx = {
enable = true;
virtualHosts = {
"hydra.julienmalka.me" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://127.0.0.1:9876"; };
};
};
};
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.supportedFilesystems = [ "zfs" ];

View file

@ -12,7 +12,7 @@ with lib;
{
nix = {
autoOptimiseStore = true;
allowedUsers = [ "julien" ];
allowedUsers = [ "julien" "hydra" ];
gc = {
automatic = true;
dates = "daily";