From 8d1615dd188af003634ff875364dbbf075a2c00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 28 Oct 2024 17:35:41 +0100 Subject: [PATCH] renovate: add recommended settings --- modules/renovate.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 modules/renovate.nix diff --git a/modules/renovate.nix b/modules/renovate.nix new file mode 100644 index 00000000..e9a0e8e --- /dev/null +++ b/modules/renovate.nix @@ -0,0 +1,31 @@ +{ config, lib, libS, ... }: + +let + cfg = config.services.renovate; +in +{ + options.services.renovate = lib.optionalAttrs (!lib.versionAtLeast lib.version "24.11") { + # TODO: clean up when updating to 24.11 + enable = lib.mkOption { + type = lib.types.bool; + default = false; + internal = !(lib.versionAtLeast lib.version "24.11"); + }; + settings = lib.mkOption { + type = lib.types.freeformSetting; + internal = !(lib.versionAtLeast lib.version "24.11"); + }; + } // { + recommendedDefaults = libS.mkOpinionatedOption "set recommended default settings"; + }; + + config = lib.mkIf cfg.enable { + services.renovate.settings = { + cachePrivatePackages = true; + configMigration = true; + optimizeForDisabled = true; + persistRepoData = true; + repositoryCache = "enabled"; + }; + }; +}