From 17d0886e761698238d83aa94d4eb538b9bbaaee5 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 9 May 2023 02:02:23 +0200 Subject: [PATCH 1/2] gitlab: ensure service is restarted again after dependency restarts When a dependency, like postgresql.service or redis-gitlab.service, had been stopped and started at switch-to-configuration time, gitlab.service and its helper units had been stopped but not had been started again. This commit fixes this by upgrading the dependy relationship of gitlab.service towards gitlab.target from a "Wants" to a "Requires". It should be enough to do this for this single unit part of gitlab.target only, as all other units wantedBy gitlab.target are pulled in by gitlab.service as well. fixes PL-131286 --- nixos/roles/gitlab.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/roles/gitlab.nix b/nixos/roles/gitlab.nix index 57eca1b0c..29d42a458 100644 --- a/nixos/roles/gitlab.nix +++ b/nixos/roles/gitlab.nix @@ -218,6 +218,12 @@ in # Needed for Git via SSH. users.users.gitlab.extraGroups = [ "login" ]; + # ensure that gitlab is restarted again, when stopped due to a dependency + # (e.g. postgresql) being stopped and started again + systemd.services.gitlab = { + wantedBy = lib.mkForce []; + requiredBy = [ "gitlab.target" ]; + }; }) (lib.mkIf (cfg.enable && cfg.extraSecrets != []) { From 42a9a3f98375fc95e2de2e5de626986986fa2193 Mon Sep 17 00:00:00 2001 From: Tobias Stenzel Date: Tue, 9 May 2023 22:05:38 +0200 Subject: [PATCH 2/2] fc-userscan ignore nixpkgs- dirs Takes a long time to scan a nixpkgs dir which often happens on dev systems. This also leads to false positives and sometimes (?) triggers an unclear error in userscan ("file name too long"). --- nixos/platform/collect-garbage-userscan.exclude | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/platform/collect-garbage-userscan.exclude b/nixos/platform/collect-garbage-userscan.exclude index af87e724b..d92e14edf 100644 --- a/nixos/platform/collect-garbage-userscan.exclude +++ b/nixos/platform/collect-garbage-userscan.exclude @@ -10,6 +10,7 @@ **/journal/ **/lucene/ **/solr/data/ +**/nixpkgs-*/ # Files in sub-directories to ignore (anywhere in the home directory) **/.local/share/fish/fish_history **/diagnostic.data/metrics.*