43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
# SPDX-FileCopyrightText: 2024 Luke Granger-Brown <depot@lukegb.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
{ depot, pkgs, ... }:
|
|
|
|
{
|
|
my.hostname = "constructive-criticism";
|
|
|
|
services.gitlab-runner = {
|
|
enable = true;
|
|
package = depot.nix.pkgs.heptapod-runner;
|
|
extraPackages = [
|
|
pkgs.git
|
|
depot.nix.pkgs.heptapod-runner-mercurial
|
|
];
|
|
services.constructive-criticism = {
|
|
registrationConfigFile = "/var/lib/gitlab-runner/registration";
|
|
executor = "shell";
|
|
tagList = [ "macos" ];
|
|
};
|
|
};
|
|
launchd.daemons.gitlab-runner = {
|
|
serviceConfig = {
|
|
StandardOutPath = "/var/lib/gitlab-runner/out.log";
|
|
StandardErrorPath = "/var/lib/gitlab-runner/err.log";
|
|
KeepAlive.NetworkState = true;
|
|
};
|
|
};
|
|
environment.systemPackages = with pkgs; [
|
|
git
|
|
depot.nix.pkgs.mercurial
|
|
];
|
|
users.knownUsers = [ "gitlab-runner" ];
|
|
users.knownGroups = [ "gitlab-runner" ];
|
|
system.activationScripts.postActivation.text = ''
|
|
ln -s -f "${depot.nix.pkgs.heptapod-runner-hgrc}" "/var/lib/gitlab-runner/.hgrc"
|
|
|
|
pmset -a sleep 0 womp 1 autorestart 1
|
|
'';
|
|
|
|
system.stateVersion = 5;
|
|
}
|