From d4ce54e1ebaca71bc9e41f08ab7973b1950f79fb Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Mon, 7 Aug 2023 02:07:35 +0100 Subject: [PATCH 1/2] nixos: updated the gitlab runner to fix an issue it had with docker --- applications/gitlab_runner.nix | 5 +++++ flake.lock | 8 ++++---- flake.nix | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/applications/gitlab_runner.nix b/applications/gitlab_runner.nix index 9a5401b..45186b0 100644 --- a/applications/gitlab_runner.nix +++ b/applications/gitlab_runner.nix @@ -52,6 +52,9 @@ boot.kernel.sysctl."net.ipv4.ip_forward" = true; # 1 + # taken from https://github.com/NixOS/nixpkgs/issues/245365#issuecomment-1663854128 + virtualisation.docker.listenOptions = [ "/run/docker.sock" "127.0.0.1:2375" ]; + services.gitlab-runner = { enable = true; @@ -65,6 +68,7 @@ runner_nix = { cloneUrl = cfg.runner.gitlab; description = cfg.runner.description; + registrationFlags = [ "--docker-host" "tcp://127.0.0.1:2375" ]; registrationConfigFile = config.age.secrets.runner_nix.path; dockerImage = cfg.runner.docker.image; @@ -103,6 +107,7 @@ runner_general = { cloneUrl = cfg.runner.gitlab; description = cfg.runner.description; + registrationFlags = [ "--docker-host" "tcp://127.0.0.1:2375" ]; registrationConfigFile = config.age.secrets.runner_general.path; dockerImage = cfg.runner.docker.image; }; diff --git a/flake.lock b/flake.lock index 64f4fde..7fe7112 100644 --- a/flake.lock +++ b/flake.lock @@ -252,16 +252,16 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1691252436, - "narHash": "sha256-SKKPKYOnFcwqECehxoFBMLv29CZXC5qCDuETSuXd82g=", + "lastModified": 1691276849, + "narHash": "sha256-RNnrzxhW38SOFIF6TY/WaX7VB3PCkYFEeRE5YZU+wHw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9607b9149c9d81fdf3dc4f3bcc278da146ffbd77", + "rev": "5faab29808a2d72f4ee0c44c8e850e4e6ada972f", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.05", + "ref": "nixos-unstable", "type": "indirect" } }, diff --git a/flake.nix b/flake.nix index df382ce..b0233fe 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs = { # gonna start off with a fairly modern base - nixpkgs.url = "nixpkgs/nixos-23.05"; + nixpkgs.url = "nixpkgs/nixos-unstable"; # utility stuff flake-utils.url = "github:numtide/flake-utils"; From abdeb5e83e259a7e098052b121e0128f8d74974a Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Mon, 7 Aug 2023 02:11:07 +0100 Subject: [PATCH 2/2] git: enforce use of LF since we have linux servers --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index 3e4aaf8..3da48a6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,9 @@ +# Git config here +* text eol=lf + +############################################# +# Git lfs stuff + # Documents *.pdf filter=lfs diff=lfs merge=lfs -text *.doc filter=lfs diff=lfs merge=lfs -text