Repository navigation
Conversation
Replace the Makefile and base template with flake-parts modules that
consumers import as aspects (flakeModules.{default,r,quarto,cloudflare-pages}),
discovered via an in-house import-tree (no extra inputs).
- core: devshell, treefmt, tasks (apps), generated files with drift
check (.gitignore, .envrc, CI stubs, VS Code settings), site, github
- lang/r: R env from DESCRIPTION, air (jarl opt-in), R CMD check
- lang/quarto: quartoMinimal, site package, preview/render tasks, R composition
- deploy/cloudflare-pages: wrangler deploy task and CI wiring
- reusable ci.yml / maintenance.yml workflows called by generated stubs
- dev partition (flake-schemas, dogfooding) keeps consumer locks at 5 nodes
- contract tests: unit tests plus md/r/quarto fixtures and templates
- templates default/r/quarto; README rewritten
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove generated-file banners, preserve existing files when initializing, and keep scheduled maintenance only in nullkomma. Test downstream initialization and preservation of user edits. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move flake-schemas into shared inputs and the default aspect. Test schema inventories for fixtures and templates, retain dev partitioning, and remove the now-empty dev input flake. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Per-system options are declared via mkPerSystemOption so they can be documented; the reference is rendered into the Quarto site. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Dependencies come from read.dcf and tools::package_dependencies in a small derivation; base packages are derived from the pinned R. Removes lib.r parseDCF/depNames/depsFromDescription/basePackages and exposes perSystem nullkomma.r.dependencies. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Read DESCRIPTION constraints with R, reuse nixpkgs package recipes, and initialize a user-owned PPM profile. Append dated snapshot pins during maintenance and test the snapshot/remote consumer contract. Document the initial resolver limits and transitive locking model. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nullkomma's goal is to hold all the non-project-specific boilerplate (devshells, formatting, checks, docs, CI, deploys), so that adopting repos carry just a short
flake.nixand aflake.lock. The Makefile and template approach couldn't compose: a language couldn't extend a shared concern (for example, R addingairto treefmt), consumers had no typed knobs, and upgrades meant re-copying files. This PR rebuilds nullkomma as flake-parts modules that consumers import.Fixes: #113
Approach
flakeModules.default, plus optionalr,quartoandcloudflare-pages. A consumer'sflake.nixis anullkomma.lib.mkFlakecall withimports = [ ... ]plus whatevernullkomma.*options it sets. A module extends shared concerns only when it is imported. For example,raddsairto treefmt, R to the devshell,*.Rcheck/to.gitignoreandR CMD checktochecks.modules/is a flake-parts module, collected by a small in-houselib/import-tree.nix. The layout adds no flake inputs.nullkomma.r.extraPackages,nullkomma.r.check.errorOn,nullkomma.quarto.site.enable,nullkomma.cloudflare-pages.projectandnullkomma.editor.vscode.*. R packages are read fromDESCRIPTION.nix run .#<task>forcheck,update,write-files,preview,renderanddeploy. Barenix runlists them.nix run .#write-fileswrites.gitignore,.envrc,.github/workflows/{push,cron}.ymland.vscode/*.json.checks.filesfails when they're out of date. The workflows are thin stubs that call the reusableci.ymlandmaintenance.ymlin this repo.dev/(a separate input flake, loaded through flake-parts partitions), so they never reach consumer locks.checks.unitevaluates the md, R and Quarto test repos undertests/fixtures/and the templates, and checks what each produces, for example that markdown-only repos get no R. Each test repo's devshell, treefmt,R CMD checkand site are also built as checks.Worth a careful look
templates/baseand the Makefile are gone.ci.withis nowci.inputs, becausewithis a Nix keyword.jarlis opt-in: its tests fail to build on aarch64-darwin.nullkomma.r.root: the default isself. A subpath likedirOf (self + "/DESCRIPTION")can't be used as a build source under lazy trees, so the source path is configurable..gitignorere-includes the files nullkomma manages (!/.vscode/settings.jsonetc.). A global excludes file would otherwise hide them from the flake and breakchecks.files.@mainof nullkomma's reusable workflows.lib.debug.runTests, which makes unpin nix-unit once nixpkgs has nixComponents_2_35聽#148 and remove nested list evaluation warning聽#143 obsolete. The Makefile replacement covers expose nicer task runner聽#136 and complete and add documentation for makefile聽#122.write-filesduring maintenance updates.Verification
nix flake checkpasses on aarch64-darwin. That covers the unit and contract tests,R CMD check(Status: OK), the Quarto site with an executed R chunk, and the root site.rtemplate. It locks to 5 nodes, andwrite-files,nix flake checkand the devshell all work.deploytask;