58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{ config
|
|
, pkgs
|
|
, lib
|
|
, ...
|
|
}:
|
|
|
|
{
|
|
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.txt;
|
|
|
|
services.syncthing = {
|
|
enable = true;
|
|
openDefaultPorts = true;
|
|
};
|
|
|
|
services.hydra = {
|
|
enable = true;
|
|
hydraURL = "http://localhost:3000"; # externally visible URL
|
|
notificationSender = "hydra@${config.networking.hostName}.stefanjunker.de"; # 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.buildMachines = [
|
|
{ hostName = "localhost";
|
|
system = "x86_64-linux";
|
|
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
|
|
maxJobs = 4;
|
|
}
|
|
];
|
|
|
|
services.gitlab-runner = {
|
|
enable = true;
|
|
|
|
packages = with pkgs; [
|
|
bash
|
|
gitlab-runner
|
|
nix
|
|
gitFull
|
|
git-crypt
|
|
];
|
|
|
|
configFile = let
|
|
nixRunnerToken = "/etc/secrets/gitlab-runner/nix-runner.token";
|
|
in pkgs.writeText "config.toml" ''
|
|
concurrent = 2
|
|
check_interval = 0
|
|
[[runners]]
|
|
name = "nix-runner"
|
|
url = "https://gitlab.com"
|
|
token = "<% sed -z 's/[\n\s]//g' ${nixRunnerToken} %>"
|
|
executor = "shell"
|
|
shell = "bash"
|
|
[runners.cache]
|
|
'';
|
|
};
|
|
}
|