{"id":13611120,"url":"https://github.com/divnix/std","last_synced_at":"2025-04-04T20:15:27.523Z","repository":{"id":36970367,"uuid":"427903373","full_name":"divnix/std","owner":"divnix","description":"A DevOps framework for the SDLC with the power of Nix and Flakes. Good for keeping deadlines!","archived":false,"fork":false,"pushed_at":"2024-08-06T14:44:27.000Z","size":6783,"stargazers_count":380,"open_issues_count":35,"forks_count":41,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-08-07T12:37:36.741Z","etag":null,"topics":["devops","nix","nix-flakes","sdlc"],"latest_commit_sha":null,"homepage":"https://std.divnix.com","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divnix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSES/BSD-3-Clause.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-14T10:56:16.000Z","updated_at":"2024-08-07T12:37:36.741Z","dependencies_parsed_at":"2023-02-19T04:00:36.867Z","dependency_job_id":"52a2dd1a-94f9-46a5-8a12-8bc897ea992d","html_url":"https://github.com/divnix/std","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divnix%2Fstd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divnix%2Fstd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divnix%2Fstd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divnix%2Fstd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divnix","download_url":"https://codeload.github.com/divnix/std/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242681,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","nix","nix-flakes","sdlc"],"created_at":"2024-08-01T19:01:51.968Z","updated_at":"2025-04-04T20:15:27.498Z","avatar_url":"https://github.com/divnix.png","language":"Nix","readme":"\u003c!--\nSPDX-FileCopyrightText: 2022 The Standard Authors\nSPDX-FileCopyrightText: 2022 Kevin Amado \u003ckamadorueda@gmail.com\u003e\n\nSPDX-License-Identifier: Unlicense\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/divnix/std/raw/main/artwork/logo.png\" width=\"250\" /\u003e\n  \u003ch1\u003eStandard\u003c/h1\u003e\n  \u003cp\u003eShip today.\u003c/span\u003e\n\u003c/div\u003e\n\n\u003c!--\n_By [Kevin Amado](https://github.com/kamadorueda),\nwith contributions from [David Arnold](https://github.com/blaggacao),\n[Timothy DeHerrera](https://github.com/nrdxp)\nand many more amazing people (see end of file for a full list)._\n--\u003e\n\n---\n\n[Standard][std] is a nifty DevOps framework that\nenables an efficient Software Development Life Cycle (SDLC) with the power of [Nix][nix] via [Flakes][nix-flakes].\n\nIt organizes and disciplines your Nix and thereby speeds you up.\nIt also comes with great horizontal integrations of high\nquality vertical DevOps tooling crafted by the [Nix Ecosystem][ecosystem].\n\n---\n\n[![Support room on Matrix](https://img.shields.io/matrix/std-nix:matrix.org?server_fqdn=matrix.org\u0026style=for-the-badge)](https://matrix.to/#/#std-nix:matrix.org)\n\n###### Stack\n\n[![Yants](https://img.shields.io/badge/DivNix-Yants-green?style=for-the-badge\u0026logo=NixOS)](https://github.com/divnix/yants)\n[![DMerge](https://img.shields.io/badge/DivNix-DMerge-yellow?style=for-the-badge\u0026logo=NixOS)](https://github.com/divnix/data-merge)\n[![NoSys](https://img.shields.io/badge/DivNix-NoSys-orange?style=for-the-badge\u0026logo=NixOS)](https://github.com/divnix/nosys)\n[![Blank](https://img.shields.io/badge/DivNix-Blank-grey?style=for-the-badge\u0026logo=NixOS)](https://github.com/divnix/blank)\n[![Incl](https://img.shields.io/badge/DivNix-Incl-blue?style=for-the-badge\u0026logo=NixOS)](https://github.com/divnix/incl)\n[![Paisano](https://img.shields.io/badge/DivNix-Paisano-red?style=for-the-badge\u0026logo=NixOS)](https://github.com/divnix/paisano)\n\n###### Integrations\n\n[![Numtide Devshell](https://img.shields.io/badge/Numtide-Devshell-yellowgreen?style=for-the-badge\u0026logo=NixOS)](https://github.com/numtide/devshell)\n[![Numtide Treefmt](https://img.shields.io/badge/Numtide-Treefmt-yellow?style=for-the-badge\u0026logo=NixOS)](https://github.com/numtide/treefmt)\n[![Nlewo Nix2Container](https://img.shields.io/badge/Nlewo-Nix2Container-blue?style=for-the-badge\u0026logo=NixOS)](https://github.com/nlewo/nix2container)\n[![Fluidattacks Makes](https://img.shields.io/badge/Fluidattacks-Makes-blue?style=for-the-badge\u0026logo=NixOS)](https://github.com/fluidattacks/makes)\n[![Astro MicroVM](https://img.shields.io/badge/Astro-MicroVM-blue?style=for-the-badge\u0026logo=NixOS)](https://github.com/astro/microvm.nix)\n[![HerculesCI FlakeParts](https://img.shields.io/badge/HerculesCI-FlakeParts-lightgrey?style=for-the-badge\u0026logo=NixOS)](https://github.com/hercules-ci/flake-parts)\n[![Cachix Cache](https://img.shields.io/badge/Cachix-Cache-blue?style=for-the-badge\u0026logo=NixOS)](https://github.com/cachix)\n[![Nix-Community Nixago](https://img.shields.io/badge/NixCommunity-Nixago-yellow?style=for-the-badge\u0026logo=NixOS)](https://github.com/nix-community/nixago)\n\n###### The Standard Story\n\n_Once_ your `nix` code has evolved into a giant\nball of spaghetti and nobody else except a few\nselect members of your tribe can still read it\nwith ease; and _once_ to the rest of your colleagues\nit has grown into an impertinence, _then_ `std`\nbrings the overdue order to your piece of art\nthrough a well-defined folder structure and\ndisciplining generic interfaces.\n\nWith `std`, you'll learn how to organize your `nix`\nflake outputs ('**Targets**') into **Cells** and\n**Cell Blocks** \u0026mdash; folded into a useful\n**CLI \u0026 TUI** to also make the lives of your\ncolleagues easier.\n\nThrough more intuition and less documentation,\nyour team and community will finally find a\n_canonical_ answer to the everlasting question:\n_What can I **do** with this repository?_\n\n###### The Standard NixOS Story (in case you wondered)\n\n_Once_ you got fed up with `divnix/digga`\nor a disorganized personal configuration,\nplease head straight over to [`divnix/hive`][hive]\nand join the chat, there. It's work in progress.\nBut hey! It means: we can progress together!\n\n---\n\n## Getting Started\n\n```nix\n# flake.nix\n{\n  description = \"Description for the project\";\n\n  inputs = {\n    std.url = \"github:divnix/std\";\n    nixpkgs.follows = \"std/nixpkgs\";\n  };\n\n  outputs = { std, self, ...} @ inputs: std.growOn {\n    inherit inputs;\n    # 1. Each folder inside `cellsFrom` becomes a \"Cell\"\n    #    Run for example: 'mkdir nix/mycell'\n    # 2. Each \u003cblock\u003e.nix or \u003cblock\u003e/default.nix within it becomes a \"Cell Block\"\n    #    Run for example: '$EDITOR nix/mycell/packages.nix' - see example content below\n    cellsFrom = ./nix;\n    # 3. Only blocks with these names [here: \"packages\" \u0026 \"shells\"] are picked up by Standard\n    #    It's a bit like the output type system of your flake project (hint: CLI \u0026 TUI!!)\n    cellBlocks = with std.blockTypes; [\n      (installables \"packages\" {ci.build = true;})\n      (devshells \"shells\" {ci.build = true;})\n    ];\n  }\n  # 4. Run 'nix run github:divnix/std'\n  # 'growOn' ... Soil:\n  #  - here, compat for the Nix CLI\n  #  - but can use anything that produces flake outputs (e.g. flake-parts or flake-utils)\n  # 5. Run: nix run .\n  {\n    devShells = std.harvest self [\"mycell\" \"shells\"];\n    packages = std.harvest self [\"mycell\" \"packages\"];\n  };\n}\n\n# nix/mycell/packages.nix\n{inputs, cell}: {\n  inherit (inputs.nixpkgs) hello;\n  default = cell.packages.hello;\n}\n```\n\n## This Repository\n\nThis repository combines the above mentioned stack components into the ready-to-use Standard framework.\nIt adds a curated collection of [**Block Types**][blocktypes] for DevOps use cases.\nIt further dogfoods itself and implements utilities in its own [**Cells**][cells].\n\n###### Dogfooding\n\n\u003csub\u003eOnly renders in the [Documentation][documentation].\u003c/sub\u003e\n\n```nix\n{{#include ../dogfood.nix}}\n```\n\n_That's it. `std.grow` is a \"smart\" importer of your `nix` code and is designed to keep boilerplate at bay. In the so called \"Soil\" compatibility layer, you can do whatever your heart desires. For example put `flake-utils` or `flake-parts` patterns here. Or, as in the above example, just make your stuff play nicely with the Nix CLI._\n\n\u003e **TIP:**\n\u003e\n\u003e 1. Clone this repo `git clone https://github.com/divnix/std.git`\n\u003e 2. Install `direnv` \u0026 inside the repo, do: `direnv allow` (first time takes a little longer)\n\u003e 3. Run the TUI by entering `std` (first time takes a little longer)\n\u003e\n\u003e \u003ccenter\u003e\u003ci\u003eWhat can I \u003cb\u003edo\u003c/b\u003e with this repository?\u003c/i\u003e\u003c/center\u003e\n\u003e \u0026emsp;\n\n## Documentation\n\nThe [Documentation][documentation] is here.\n\nAnd here is the [Book][book], a very good walk-trough. Start here!\n\n###### Video Series\n\n- [Std - Introduction](https://www.loom.com/share/cf9d5d1a10514d65bf6b8287f7ddc7d6)\n- [Std - Cell Blocks Deep Dive](https://www.loom.com/share/04fa1d578fd044059b02c9c052d87b77)\n- [Std - Operables \u0026 OCI](https://www.loom.com/share/27d91aa1eac24bcaaaed18ea6d6d03ca)\n- [Std - Nixago](https://www.loom.com/share/5c1badd77ab641d3b8e256ddbba69042)\n\n###### Examples in the Wild\n\nThis [GitHub search query](https://github.com/search?q=%22divnix%2Fstd%22+path%3Aflake.nix\u0026type=Code) holds a pretty good answer.\n\n## Why?\n\n- [Why `nix`?][why-nix]\n- [Why `std`?][why-std]\n\n## Contributions\n\nPlease enter the contribution environment:\n\n```console\ndirenv allow || nix develop -c \"$SHELL\"\n```\n\n## Licenses\n\n_What licenses are used? \u0026rarr; [`./.reuse/dep5`][licensing]._\n\n_And the usual copies? \u0026rarr; [`./LICENSES`][licenses]._\n\n---\n\n[cells]: https://github.com/divnix/std/tree/main/cells\n[documentation]: https://std.divnix.com\n[book]: https://jmgilman.github.io/std-book/\n[licensing]: https://github.com/divnix/std/blob/main/.reuse/dep5\n[licenses]: https://github.com/divnix/std/tree/main/LICENSES\n[blocktypes]: https://github.com/divnix/std/blob/main/src/blocktypes.nix\n[nix-flakes]: https://nixos.wiki/wiki/Flakes\n[nix]: https://nixos.org/manual/nix/unstable\n[std]: https://github.com/divnix/std\n[why-std]: https://std.divnix.com/explain/why-std.html\n[why-nix]: https://std.divnix.com/explain/why-nix.html\n[ecosystem]: https://discourse.nixos.org\n[hive]: https://github.com/divnix/hive\n","funding_links":[],"categories":["Nix","DevOps"],"sub_categories":["Discovery"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivnix%2Fstd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivnix%2Fstd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivnix%2Fstd/lists"}