added a basic hydra

This commit is contained in:
Rouven Seifert 2023-05-01 21:05:49 +02:00
parent b7ecc2984d
commit d41c30a414
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
4 changed files with 28 additions and 3 deletions

View file

@ -1,5 +1,6 @@
{
description = "My nix setup"; inputs = {
description = "My nix setup";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
@ -63,7 +64,7 @@
};
outputs =
{ self
{ self
, nixpkgs
, home-manager
, nix-index-database
@ -77,6 +78,7 @@
, ...
}@attrs: {
packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage;
hydraJobs.x86_64-linux.default = self.packages.x86_64-linux.default;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
nixosConfigurations = {
thinkpad = nixpkgs.lib.nixosSystem {

View file

@ -8,6 +8,7 @@
./modules/adguard
./modules/networks
./modules/backup
./modules/hydra
./modules/nextcloud
./modules/vaultwarden
./modules/nginx
@ -21,6 +22,10 @@
tmp.useTmpfs = true;
};
services.btrfs.autoScrub.enable = true;
nix.settings = {
cores = 3;
auto-optimise-store = true;
};
time.timeZone = "Europe/Berlin";

View file

@ -0,0 +1,19 @@
{ config, ... }:
let
domain = "hydra.rfive.de";
in
{
services.hydra = {
enable = true;
port = 4000;
hydraURL = domain;
notificationSender = "hydra@localhost";
};
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.hydra.port}";
};
};
}

View file

@ -20,7 +20,6 @@
};
nix.settings = {
# cores = 6; # don't clutter the whole system when compiling stuff
auto-optimise-store = true;
};