From 11a21210d0b8c13aabfa15b97ba36465b808a009 Mon Sep 17 00:00:00 2001 From: technofab Date: Sat, 20 Dec 2025 21:29:21 +0100 Subject: [PATCH] chore(flake): update flakes, add rensa devtools, etc. --- .gitlab-ci.yml | 4 +-- .gitlab/renovate.json5 | 22 +++++++++++++ cells/repo/devShells.nix | 68 +++++++++++++++++++++++++++++++++------- cells/repo/flake.lock | 50 +++++++++++++++++++---------- cells/repo/flake.nix | 3 +- cells/repo/soonix.nix | 33 +++++++++++++++++++ flake.lock | 12 +++---- flake.nix | 2 ++ 8 files changed, 158 insertions(+), 36 deletions(-) create mode 100644 .gitlab/renovate.json5 create mode 100644 cells/repo/soonix.nix diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a415272..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.2 +- component: gitlab.com/TECHNOFAB/nix-gitlab-ci/nix-gitlab-ci@3.1.2 inputs: - version: 3.0.0-alpha.2 + version: 3.1.2 diff --git a/.gitlab/renovate.json5 b/.gitlab/renovate.json5 new file mode 100644 index 0000000..88197fc --- /dev/null +++ b/.gitlab/renovate.json5 @@ -0,0 +1,22 @@ +{ + "extends": [ + "config:recommended" + ], + "gitlabci": { + "enabled": false + }, + "lockFileMaintenance": { + "enabled": true, + "extends": [ + "schedule:monthly" + ] + }, + "nix": { + "enabled": true + }, + "postUpgradeTasks": { + "commands": [ + "nix-portable nix run .#soonix:update" + ] + } +} diff --git a/cells/repo/devShells.nix b/cells/repo/devShells.nix index 5ea02bc..12a5772 100644 --- a/cells/repo/devShells.nix +++ b/cells/repo/devShells.nix @@ -3,21 +3,67 @@ cell, ... }: let - inherit (inputs) pkgs dslib soonix treefmt; - inherit (cell) ci; + inherit (inputs) pkgs dslib treefmt devtools-lib; + inherit (cell) soonix; + treefmtWrapper = treefmt.mkWrapper pkgs { + programs = { + alejandra.enable = true; + mdformat.enable = true; + }; + settings.formatter.mdformat = { + command = let + pkg = pkgs.python3.withPackages (p: [ + p.mdformat + p.mdformat-mkdocs + ]); + in "${pkg}/bin/mdformat"; + excludes = [ + "CHANGELOG.md" + "*LICENSE*.md" + ]; + }; + }; in { default = dslib.mkShell { - imports = [soonix.devshellModule]; + imports = [soonix.devshellModule devtools-lib.devshellModule]; packages = [ - (treefmt.mkWrapper pkgs { - programs = { - alejandra.enable = true; - mdformat.enable = true; - }; - settings.global.excludes = ["*LICENSE*.md"]; - }) + treefmtWrapper ]; enterShellCommands."ren".text = "echo Hello rensa!"; - 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 = "nix run .#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 = "core"; + owner = "rensa-nix"; + }; + }; }; } diff --git a/cells/repo/flake.lock b/cells/repo/flake.lock index 3993d96..b99a60f 100644 --- a/cells/repo/flake.lock +++ b/cells/repo/flake.lock @@ -3,11 +3,11 @@ "devshell": { "locked": { "dir": "lib", - "lastModified": 1755673398, - "narHash": "sha256-51MmR+Eo1+bKDd/Ss77wwTqi4yAR2xgmyCSEbKWSpj0=", + "lastModified": 1758204313, + "narHash": "sha256-ainbY0Oajb1HMdvy+A8QxF/P5qwcbEzJGEY5pzKdDdc=", "owner": "rensa-nix", "repo": "devshell", - "rev": "e76bef387e8a4574f9b6d37b1a424e706491af08", + "rev": "7d0c4bc78d9f017a739b0c7eb2f4e563118353e6", "type": "gitlab" }, "original": { @@ -17,20 +17,37 @@ "type": "gitlab" } }, + "devtools-lib": { + "locked": { + "dir": "lib", + "lastModified": 1766237846, + "narHash": "sha256-7n3WFabnf49SFHXD/e4zfLit3BniZZOecUXfBm3d1d0=", + "owner": "rensa-nix", + "repo": "devtools", + "rev": "5c8712f48c5bcb6b79d3da1afd1268f84f5e35e3", + "type": "gitlab" + }, + "original": { + "dir": "lib", + "owner": "rensa-nix", + "repo": "devtools", + "type": "gitlab" + } + }, "nix-gitlab-ci-lib": { "locked": { "dir": "lib", - "lastModified": 1756974596, - "narHash": "sha256-KxQj76sUqvPNtrqzNWMZeOWqTitc0aFCYj7UZzToiEA=", + "lastModified": 1765444672, + "narHash": "sha256-B0cMjRs9P50ym9Le0VUcRN69Yy6tbV13MXq81tTTEus=", "owner": "TECHNOFAB", "repo": "nix-gitlab-ci", - "rev": "00cf5b83c6c46698fba12a54b9cc15c6d4e5a4dd", + "rev": "8f88a53b5479773cd626420362631bc1da99e677", "type": "gitlab" }, "original": { "dir": "lib", "owner": "TECHNOFAB", - "ref": "3.0.0-alpha.2", + "ref": "3.1.2", "repo": "nix-gitlab-ci", "type": "gitlab" } @@ -38,11 +55,11 @@ "nixmkdocs": { "locked": { "dir": "lib", - "lastModified": 1755785622, - "narHash": "sha256-xBb9PCkszmrWSEqUiPC7oBJABm1thF572S5QHtloZ+M=", + "lastModified": 1766062227, + "narHash": "sha256-jhr5CUi9eDeMIAJn7ayXP8Wr+Y2loV5EhdDIKDkRIdw=", "owner": "TECHNOFAB", "repo": "nixmkdocs", - "rev": "61da605a9bff12f66c4b743f43aea59ca200f533", + "rev": "cb0bb5dc3382e8ba5d81324a2f1fd94ccd5a5df4", "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": 1757424411, - "narHash": "sha256-x99obZwqDAhUB+VUhAV9sKH00NnsVi481n/8bdvZCUY=", + "lastModified": 1766044966, + "narHash": "sha256-VB8PgA5QYmehFCGGz8YmlmuhCG43ab9rK9ufdKmfjao=", "owner": "TECHNOFAB", "repo": "soonix", - "rev": "add807ef8980197bbd06652a36d937b93b2a31c7", + "rev": "e9860d65a0123af948c1a2da65664a6d481efe05", "type": "gitlab" }, "original": { @@ -81,11 +99,11 @@ "treefmt-nix": { "flake": false, "locked": { - "lastModified": 1755934250, - "narHash": "sha256-CsDojnMgYsfshQw3t4zjRUkmMmUdZGthl16bXVWgRYU=", + "lastModified": 1766000401, + "narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "74e1a52d5bd9430312f8d1b8b0354c92c17453e5", + "rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd", "type": "github" }, "original": { diff --git a/cells/repo/flake.nix b/cells/repo/flake.nix index 00c7975..46a3c1d 100644 --- a/cells/repo/flake.nix +++ b/cells/repo/flake.nix @@ -3,7 +3,8 @@ devshell.url = "gitlab:rensa-nix/devshell?dir=lib"; nixmkdocs.url = "gitlab:TECHNOFAB/nixmkdocs?dir=lib"; soonix-lib.url = "gitlab:TECHNOFAB/soonix?dir=lib"; - nix-gitlab-ci-lib.url = "gitlab:TECHNOFAB/nix-gitlab-ci/3.0.0-alpha.2?dir=lib"; + nix-gitlab-ci-lib.url = "gitlab:TECHNOFAB/nix-gitlab-ci/3.1.2?dir=lib"; + devtools-lib.url = "gitlab:rensa-nix/devtools?dir=lib"; treefmt-nix = { url = "github:numtide/treefmt-nix"; flake = false; diff --git a/cells/repo/soonix.nix b/cells/repo/soonix.nix new file mode 100644 index 0000000..53ab419 --- /dev/null +++ b/cells/repo/soonix.nix @@ -0,0 +1,33 @@ +{ + 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" + ]; + lockFileMaintenance = { + enabled = true; + extends = ["schedule:monthly"]; + }; + nix.enabled = true; + gitlabci.enabled = false; + }; + hook = { + mode = "copy"; + gitignore = false; + }; + opts.format = "json"; + }; + }; + }).config diff --git a/flake.lock b/flake.lock index 8d70ca1..4baf8fb 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1754340878, - "narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=", + "lastModified": 1766125104, + "narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cab778239e705082fe97bb4990e0d24c50924c04", + "rev": "7d853e518814cca2a657b72eeba67ae20ebf7059", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1754184128, - "narHash": "sha256-AjhoyBL4eSyXf01Bmc6DiuaMrJRNdWopmdnMY0Pa/M0=", + "lastModified": 1765674936, + "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "02e72200e6d56494f4a7c0da8118760736e41b60", + "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 44b7116..734f599 100644 --- a/flake.nix +++ b/flake.nix @@ -22,11 +22,13 @@ (simple "devShells") (simple "docs") (simple "ci") + (simple "soonix") ]; } { packages = rensa.select inputs.self [ ["repo" "docs"] ["repo" "ci" "packages"] + ["repo" "soonix" "packages"] ]; }; }