diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1af5ed2..7d70f67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # Generated by soonix, DO NOT EDIT include: -- component: gitlab.com/TECHNOFAB/nix-gitlab-ci/nix-gitlab-ci@3.0.0-alpha.3 +- component: gitlab.com/TECHNOFAB/nix-gitlab-ci/nix-gitlab-ci@3.1.2 inputs: - version: 3.0.0-alpha.3 + version: 3.1.2 diff --git a/.gitlab/renovate.json5 b/.gitlab/renovate.json5 new file mode 100644 index 0000000..086f924 --- /dev/null +++ b/.gitlab/renovate.json5 @@ -0,0 +1,25 @@ +{ + "extends": [ + "config:recommended" + ], + "gitlabci": { + "enabled": false + }, + "lockFileMaintenance": { + "branchTopic": "lock-file-maintenance-{{packageFile}}", + "commitMessageExtra": "({{packageFile}})", + "enabled": true, + "extends": [ + "schedule:monthly" + ] + }, + "nix": { + "enabled": true + }, + "postUpgradeTasks": { + "commands": [ + "nix-portable nix run .#soonix:update" + ], + "executionMode": "branch" + } +} diff --git a/flake.lock b/flake.lock index 933ad69..85629e5 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "lastModified": 1766902085, + "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4", "type": "github" }, "original": { @@ -37,16 +37,17 @@ }, "locked": { "dir": "lib", - "lastModified": 1758738378, - "narHash": "sha256-NjzqdvQCDDdObEBH8x/vdhbdhrIB+N9E570uCdksGHY=", + "lastModified": 1766497301, + "narHash": "sha256-W7WeOXMUZROMtbU1qQNWy/yai+k8gG09YACFQ7ImpsQ=", "owner": "rensa-nix", "repo": "core", - "rev": "abe19f9f13aff41de2b63304545c87d193d19ef4", + "rev": "e08c48b5db1052bfb8b8dad764e05decc1af893e", "type": "gitlab" }, "original": { "dir": "lib", "owner": "rensa-nix", + "ref": "v0.1.1", "repo": "core", "type": "gitlab" } diff --git a/flake.nix b/flake.nix index 21a37d8..62addff 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - ren.url = "gitlab:rensa-nix/core?dir=lib"; + ren.url = "gitlab:rensa-nix/core/v0.1.1?dir=lib"; }; outputs = { @@ -22,12 +22,14 @@ (simple "devShells") (simple "docs") (simple "ci") + (simple "soonix") ]; } { packages = ren.select self [ ["repo" "docs"] ["repo" "ci" "packages"] + ["repo" "soonix" "packages"] ]; }; } diff --git a/nix/repo/devShells.nix b/nix/repo/devShells.nix index 3dc1778..c6dafe0 100644 --- a/nix/repo/devShells.nix +++ b/nix/repo/devShells.nix @@ -3,22 +3,57 @@ cell, ... }: let - inherit (inputs) pkgs devshell treefmt soonix; - inherit (cell) ci; + inherit (inputs) pkgs devshell treefmt devtools-lib; + inherit (cell) soonix; + treefmtWrapper = treefmt.mkWrapper pkgs { + programs = { + alejandra.enable = true; + statix.enable = true; + deadnix.enable = true; + mdformat.enable = true; + }; + }; in { default = devshell.mkShell { - imports = [soonix.devshellModule]; + imports = [soonix.devshellModule devtools-lib.devshellModule]; packages = [ pkgs.nil - (treefmt.mkWrapper pkgs { - programs = { - alejandra.enable = true; - statix.enable = true; - deadnix.enable = true; - mdformat.enable = true; - }; - }) + treefmtWrapper ]; - soonix.hooks.ci = ci.soonix; + lefthook.config = { + "pre-commit" = { + parallel = true; + jobs = [ + { + name = "treefmt"; + stage_fixed = true; + run = "${treefmtWrapper}/bin/treefmt"; + env.TERM = "dumb"; + } + { + name = "soonix"; + stage_fixed = true; + run = "${soonix.packages."soonix:update"}/bin/soonix:update"; + } + ]; + }; + }; + cocogitto.config = { + tag_prefix = "v"; + ignore_merge_commits = true; + changelog = { + authors = [ + { + username = "TECHNOFAB"; + signature = "technofab"; + } + ]; + path = "CHANGELOG.md"; + template = "remote"; + remote = "gitlab.com"; + repository = "utils"; + owner = "rensa-nix"; + }; + }; }; } diff --git a/nix/repo/flake.lock b/nix/repo/flake.lock index 4816254..06ea0e6 100644 --- a/nix/repo/flake.lock +++ b/nix/repo/flake.lock @@ -17,20 +17,37 @@ "type": "gitlab" } }, + "devtools-lib": { + "locked": { + "dir": "lib", + "lastModified": 1767214272, + "narHash": "sha256-gvW7flZ60xdv3Z3Ksec5jcRjW2sqRHsGoJdwsNWQVPk=", + "owner": "rensa-nix", + "repo": "devtools", + "rev": "f40e59c32c48cdbf4cbc621c2f0f11e7bb80dbd3", + "type": "gitlab" + }, + "original": { + "dir": "lib", + "owner": "rensa-nix", + "repo": "devtools", + "type": "gitlab" + } + }, "nix-gitlab-ci-lib": { "locked": { "dir": "lib", - "lastModified": 1758804624, - "narHash": "sha256-2AdxBYJKflgO7oZr1CfzyAxivDkGjvFmQpOuN6Yq128=", + "lastModified": 1765444672, + "narHash": "sha256-B0cMjRs9P50ym9Le0VUcRN69Yy6tbV13MXq81tTTEus=", "owner": "TECHNOFAB", "repo": "nix-gitlab-ci", - "rev": "d88ada2c41ae05b08d7ec644a4d222e93fff78ae", + "rev": "8f88a53b5479773cd626420362631bc1da99e677", "type": "gitlab" }, "original": { "dir": "lib", "owner": "TECHNOFAB", - "ref": "3.0.0-alpha.3", + "ref": "3.1.2", "repo": "nix-gitlab-ci", "type": "gitlab" } @@ -38,11 +55,11 @@ "nixmkdocs": { "locked": { "dir": "lib", - "lastModified": 1757055638, - "narHash": "sha256-KHYSkEreFe4meXzSdEbknC/HwaQSNClQkc8vzHlAsMM=", + "lastModified": 1766404754, + "narHash": "sha256-EjBe6x6BT8ckPirMWhSf1GfaFxORYxR/Uu71FvSAm60=", "owner": "TECHNOFAB", "repo": "nixmkdocs", - "rev": "7840a5febdbeaf2da90babf6c94b3d0929d2bf74", + "rev": "cfa9606eeeb9288e2799896d7d42b3d3860f9ccb", "type": "gitlab" }, "original": { @@ -55,6 +72,7 @@ "root": { "inputs": { "devshell": "devshell", + "devtools-lib": "devtools-lib", "nix-gitlab-ci-lib": "nix-gitlab-ci-lib", "nixmkdocs": "nixmkdocs", "soonix-lib": "soonix-lib", @@ -64,11 +82,11 @@ "soonix-lib": { "locked": { "dir": "lib", - "lastModified": 1758615778, - "narHash": "sha256-tggru+siXlLcLUjHtMojkJJWTS/8I3gm8nhnlz+qrTo=", + "lastModified": 1766044966, + "narHash": "sha256-VB8PgA5QYmehFCGGz8YmlmuhCG43ab9rK9ufdKmfjao=", "owner": "TECHNOFAB", "repo": "soonix", - "rev": "e04b71c07413251dcb52036b4a51c6c7c0dca2ad", + "rev": "e9860d65a0123af948c1a2da65664a6d481efe05", "type": "gitlab" }, "original": { @@ -81,11 +99,11 @@ "treefmt-nix": { "flake": false, "locked": { - "lastModified": 1758728421, - "narHash": "sha256-ySNJ008muQAds2JemiyrWYbwbG+V7S5wg3ZVKGHSFu8=", + "lastModified": 1767122417, + "narHash": "sha256-yOt/FTB7oSEKQH9EZMFMeuldK1HGpQs2eAzdS9hNS/o=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "5eda4ee8121f97b218f7cc73f5172098d458f1d1", + "rev": "dec15f37015ac2e774c84d0952d57fcdf169b54d", "type": "github" }, "original": { diff --git a/nix/repo/flake.nix b/nix/repo/flake.nix index 6b88fd1..5d4f888 100644 --- a/nix/repo/flake.nix +++ b/nix/repo/flake.nix @@ -2,8 +2,9 @@ inputs = { nixmkdocs.url = "gitlab:TECHNOFAB/nixmkdocs?dir=lib"; devshell.url = "gitlab:rensa-nix/devshell?dir=lib"; + devtools-lib.url = "gitlab:rensa-nix/devtools?dir=lib"; soonix-lib.url = "gitlab:TECHNOFAB/soonix?dir=lib"; - nix-gitlab-ci-lib.url = "gitlab:TECHNOFAB/nix-gitlab-ci/3.0.0-alpha.3?dir=lib"; + nix-gitlab-ci-lib.url = "gitlab:TECHNOFAB/nix-gitlab-ci/3.1.2?dir=lib"; treefmt-nix = { url = "github:numtide/treefmt-nix"; flake = false; diff --git a/nix/repo/soonix.nix b/nix/repo/soonix.nix new file mode 100644 index 0000000..c1381aa --- /dev/null +++ b/nix/repo/soonix.nix @@ -0,0 +1,38 @@ +{ + inputs, + cell, + ... +}: let + inherit (inputs) soonix; + inherit (cell) ci; +in + (soonix.make { + hooks = { + ci = ci.soonix; + renovate = { + output = ".gitlab/renovate.json5"; + data = { + extends = ["config:recommended"]; + postUpgradeTasks = { + commands = [ + "nix-portable nix run .#soonix:update" + ]; + executionMode = "branch"; + }; + lockFileMaintenance = { + enabled = true; + extends = ["schedule:monthly"]; + branchTopic = "lock-file-maintenance-{{packageFile}}"; + commitMessageExtra = "({{packageFile}})"; + }; + nix.enabled = true; + gitlabci.enabled = false; + }; + hook = { + mode = "copy"; + gitignore = false; + }; + opts.format = "json"; + }; + }; + }).config