new regex parser for managing container versions with renovate
This commit is contained in:
parent
cc2e8bb5df
commit
0855f8f133
3 changed files with 44 additions and 16 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mySystem.services.onepassword-connect;
|
||||
|
@ -6,6 +6,16 @@ in
|
|||
{
|
||||
options.mySystem.services.onepassword-connect = {
|
||||
enable = mkEnableOption "onepassword-connect";
|
||||
apiVersion = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
# renovate: depName=docker.io/1password/connect-api datasource=docker
|
||||
default = "1.7.2";
|
||||
};
|
||||
syncVersion = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
# renovate: depName=docker.io/1password/connect-sync datasource=docker
|
||||
default = "1.7.2";
|
||||
};
|
||||
credentialsFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
};
|
||||
|
@ -25,7 +35,7 @@ in
|
|||
# Enable onepassword-connect containers.
|
||||
virtualisation.oci-containers.containers = {
|
||||
onepassword-connect-api = {
|
||||
image = "docker.io/1password/connect-api:1.7.2";
|
||||
image = "docker.io/1password/connect-api:${cfg.apiVersion}";
|
||||
autoStart = true;
|
||||
ports = [ "8080:8080" ];
|
||||
volumes = [
|
||||
|
@ -35,7 +45,7 @@ in
|
|||
};
|
||||
|
||||
onepassword-connect-sync = {
|
||||
image = "docker.io/1password/connect-sync:1.7.2";
|
||||
image = "docker.io/1password/connect-sync:${cfg.syncVersion}";
|
||||
autoStart = true;
|
||||
ports = [ "8081:8080" ];
|
||||
volumes = [
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"nix": {
|
||||
"enabled": true
|
||||
},
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"extends": ["schedule:daily"]
|
||||
}
|
||||
}
|
31
renovate.json5
Normal file
31
renovate.json5
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"nix": {
|
||||
"enabled": true
|
||||
},
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"extends": [
|
||||
"schedule:daily"
|
||||
]
|
||||
},
|
||||
"customManagers": [
|
||||
{
|
||||
"customType": "regex",
|
||||
"description": "Process various dependencies in nix files",
|
||||
"fileMatch": [
|
||||
"\\.nix$"
|
||||
],
|
||||
"matchStrings": [
|
||||
// Newline
|
||||
"(?m:^[ \\t]*?# ?renovate: depName=(?<depName>\\S+)( datasource=(?<datasource>\\S+))?( versioning=(?<versioning>\\S+))?( extractVersion=(?<extractVersion>\\S+))?\\n[ \\t ]*?\\S+ = \"?(?<currentValue>[^\" ]+?)\";?$)"
|
||||
],
|
||||
"datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}",
|
||||
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}",
|
||||
"extractVersionTemplate": "{{#if extractVersion}}{{{extractVersion}}}{{else}}^(?<version>.*)${{/if}}",
|
||||
},
|
||||
],
|
||||
}
|
Loading…
Reference in a new issue