aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-10-20 11:14:12 +0200
committerKarel Kočí <cynerd@email.cz>2022-10-20 11:14:12 +0200
commit79a8a7c26df6b854ec9973f42a1aa0a9dd222c3e (patch)
tree15156e6cfd87bc150f80d6f4a92e732db4b96f5b /nixos
parentad84020ba4c3dc60ac9d4a28cd81a32576af5bb3 (diff)
downloadnixos-personal-79a8a7c26df6b854ec9973f42a1aa0a9dd222c3e.tar.gz
nixos-personal-79a8a7c26df6b854ec9973f42a1aa0a9dd222c3e.tar.bz2
nixos-personal-79a8a7c26df6b854ec9973f42a1aa0a9dd222c3e.zip
mrpump: tweak gitlab runner
Diffstat (limited to 'nixos')
-rw-r--r--nixos/machine/mrpump.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/nixos/machine/mrpump.nix b/nixos/machine/mrpump.nix
index 97853d4..d00e249 100644
--- a/nixos/machine/mrpump.nix
+++ b/nixos/machine/mrpump.nix
@@ -12,6 +12,7 @@ with lib;
name = "local/nix";
tag = "latest";
bundleNixpkgs = false;
+ extraPkgs = with pkgs; [ cachix ];
nixConf = {
cores = "0";
experimental-features = [ "nix-command" "flakes" ];
@@ -56,10 +57,7 @@ with lib;
# Gitlab runner
systemd.services.gitlab-runner.serviceConfig = let
config = (pkgs.formats.toml{}).generate "gitlab-runner.toml" {
- concurent = 1;
- session_server = {
- session_timeout = 1800;
- };
+ concurrent = 1;
runners = [
{
name = "MrPump Docker (LogC)";
@@ -80,8 +78,8 @@ with lib;
docker = {
image = "local/nix:latest";
allowed_images = ["local/nix:latest"];
- pull_policy = "never";
- allowed_pull_policies = ["never"];
+ pull_policy = "if-not-present";
+ allowed_pull_policies = ["if-not-present"];
volumes_from = ["gitlabnix:ro"];
};
environment = [
@@ -89,9 +87,13 @@ with lib;
"ENV=/etc/profile.d/nix-daemon.sh"
"BASH_ENV=/etc/profile.d/nix-daemon.sh"
];
- # TODO for some reason the /tmp seems to be missing
pre_build_script = ''
+ # TODO for some reason the /tmp seems to be missing
mkdir -p /tmp
+ # We need to allow modification of nix config for cachix as
+ # otherwise it is link to the read only file in the store.
+ cp --remove-destination \
+ $(readlink -f /etc/nix/nix.conf) /etc/nix/nix.conf
'';
}
];