Add basic hydra ci

Add basic hydra ci
This commit is contained in:
GHOSCHT 2024-05-23 23:57:47 +02:00
parent f01d6cccb9
commit 241dc3e053
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
2 changed files with 30 additions and 0 deletions

View file

@ -25,6 +25,7 @@ in {
./sops.nix ./sops.nix
./restic.nix ./restic.nix
./arion ./arion
./hydra.nix
]; ];
# Enable ZFS # Enable ZFS
@ -32,6 +33,7 @@ in {
networking.hostId = "f014fc43"; networking.hostId = "f014fc43";
systemd.enableEmergencyMode = false; systemd.enableEmergencyMode = false;
networking.firewall.enable = true;
# Prevent zfs from being automounted by fstab auto discovery & zfs # Prevent zfs from being automounted by fstab auto discovery & zfs
fileSystems."/storage/dataset".options = ["noauto"]; fileSystems."/storage/dataset".options = ["noauto"];

28
hosts/franz/hydra.nix Normal file
View file

@ -0,0 +1,28 @@
{config, ...}: {
services.hydra = {
enable = true;
hydraURL = "http://localhost:3000"; # externally visible URL
notificationSender = "hydra@localhost"; # e-mail of hydra service
# 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;
};
nix.settings.allowed-uris = [
"github:"
"git+https://github.com/"
"git+ssh://github.com/"
"git+https://git.ghoscht.com/"
"git+ssh://git.ghoscht.com/"
"https://git.ghoscht.com/"
];
networking.firewall = {
allowedTCPPorts = [config.services.hydra.port];
};
# nix.gc = {
# automatic = true;
# dates = "15 3 * * *"; # [1]
# };
#
nix.autoOptimiseStore = true;
}