mirror of
https://gitlab.com/rensa-nix/devshell.git
synced 2026-02-01 23:05:08 +01:00
chore: add devtools
This commit is contained in:
parent
7d0c4bc78d
commit
a9d35d750f
11 changed files with 146 additions and 28 deletions
|
|
@ -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
|
||||
|
|
|
|||
26
.gitlab/renovate.json5
Normal file
26
.gitlab/renovate.json5
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
|
@ -6,4 +6,3 @@ DevShell is used in these projects, feel free to take inspiration from them:
|
|||
- [soonix](https://gitlab.com/TECHNOFAB/soonix)
|
||||
- [rensa-core](https://gitlab.com/rensa-nix/core)
|
||||
- [rensa-devtools](https://gitlab.com/rensa-nix/devtools)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,4 +12,3 @@ Additional functionality can be added with modules, like [Rensa DevTools](https:
|
|||
- **fast**: due to the NixOS module system it's a bit slower than `pkgs.mkShell`, but only about 10% (still in the tens of milliseconds range)
|
||||
- **minimal**: only contains the bare minimum, the rest should be added with imported modules
|
||||
- **straight forward**: no toml (like numtide/devshell), no abstractions over Nix (like devenv), just a straight forward Nix lib
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,3 @@
|
|||
|
||||
- [soonix](https://soonix.projects.tf/usage/#with-devshell)
|
||||
- [rensa devtools](https://devtools.rensa.projects.tf)
|
||||
|
||||
|
|
|
|||
13
flake.lock
generated
13
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1754498491,
|
||||
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
|
||||
"lastModified": 1766902085,
|
||||
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
|
||||
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -37,16 +37,17 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1756370106,
|
||||
"narHash": "sha256-l84ojcHuQWBwn4BRxQsMMfQpcq/Az/sHh/hSqFgVtyg=",
|
||||
"lastModified": 1766497301,
|
||||
"narHash": "sha256-W7WeOXMUZROMtbU1qQNWy/yai+k8gG09YACFQ7ImpsQ=",
|
||||
"owner": "rensa-nix",
|
||||
"repo": "core",
|
||||
"rev": "9c1a29fa9ba7cbbb78b9e47eb8afbcd29303a3b4",
|
||||
"rev": "e08c48b5db1052bfb8b8dad764e05decc1af893e",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "rensa-nix",
|
||||
"ref": "v0.1.1",
|
||||
"repo": "core",
|
||||
"type": "gitlab"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
(simple "benchmark")
|
||||
(simple "docs")
|
||||
(simple "ci")
|
||||
(simple "soonix")
|
||||
];
|
||||
}
|
||||
{
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
["repo" "benchmark"]
|
||||
["repo" "docs"]
|
||||
["repo" "ci" "packages"]
|
||||
["repo" "soonix" "packages"]
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,22 +3,57 @@
|
|||
cell,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) pkgs devshell treefmt soonix;
|
||||
inherit (cell) ci;
|
||||
in {
|
||||
default = devshell.mkShell {
|
||||
imports = [soonix.devshellModule];
|
||||
packages = [
|
||||
pkgs.nil
|
||||
(treefmt.mkWrapper pkgs {
|
||||
inherit (inputs) pkgs devshell treefmt devtools-lib;
|
||||
inherit (cell) soonix;
|
||||
treefmtWrapper = treefmt.mkWrapper pkgs {
|
||||
programs = {
|
||||
alejandra.enable = true;
|
||||
deadnix.enable = true;
|
||||
mdformat.enable = true;
|
||||
};
|
||||
})
|
||||
};
|
||||
in {
|
||||
default = devshell.mkShell {
|
||||
imports = [soonix.devshellModule devtools-lib.devshellModule];
|
||||
packages = [
|
||||
pkgs.nil
|
||||
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 = "devshell";
|
||||
owner = "rensa-nix";
|
||||
};
|
||||
};
|
||||
meta = {
|
||||
enableMenu = true;
|
||||
showMenu = "always";
|
||||
|
|
|
|||
26
nix/repo/flake.lock
generated
26
nix/repo/flake.lock
generated
|
|
@ -1,19 +1,36 @@
|
|||
{
|
||||
"nodes": {
|
||||
"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": 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"
|
||||
}
|
||||
|
|
@ -54,6 +71,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devtools-lib": "devtools-lib",
|
||||
"nix-gitlab-ci-lib": "nix-gitlab-ci-lib",
|
||||
"nixmkdocs": "nixmkdocs",
|
||||
"nixtest-lib": "nixtest-lib",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
nixtest-lib.url = "gitlab:TECHNOFAB/nixtest?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/v0.1.0?dir=lib";
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
flake = false;
|
||||
|
|
|
|||
38
nix/repo/soonix.nix
Normal file
38
nix/repo/soonix.nix
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue