Nix and NixOS

Nix-manipulator: Python library to manipulate Nix code with ease

UA2.118 (Henriot)
Hugo Herter
<p><a href="https://github.com/hoh/nix-manipulator">Nima</a>, the Nix Manipulator, is a new Python library and collection of tools for <strong>parsing, manipulating and reconstructing</strong> Nix source code.</p> <p>This presentation will introduce the project, its original goals, key features, and practical applications. It will explore the tradeoffs and decisions made during development and demonstrate how to use its various features.</p> <h3>Context</h3> <p>Started during <a href="https://saltsprint.org/">SaltSprint</a> 2025, Nima aims to fill the absence of tools for easily updating and editing Nix code. Popular tools such as <a href="https://github.com/Mic92/nix-update">nix-update</a> rely on <a href="https://github.com/Mic92/nix-update/blob/fbb35af0ed032ab634c7ef9018320d2370ecfeb1/nix_update/update.py#L26">simple string replacement</a> or regular expressions for updating Nix code.</p> <h3>Goals</h3> <ul> <li>Ease of use.</li> <li>High-level abstractions make manipulating expressions easy.</li> <li>Preserving formatting and comments in code that respects RFC-166.</li> </ul> <p>Eccentric formatting that does not respect RFC-166 and would add unnecessary complexity may not be preserved.</p> <h3>Targeted applications</h3> <ul> <li>Updating values in Nix code by hand, scripts, pipelines, and frameworks.</li> <li>Writing refactoring tools.</li> <li>Interactive modifications from a REPL.</li> </ul> <h3>Foundations</h3> <p>Nima builds on <strong>tree‑sitter</strong>, a multilingual concrete‑syntax AST, with the <a href="https://github.com/nix-community/tree-sitter-nix">tree‑sitter‑nix</a> grammar providing lossless parsing of Nix files.</p> <h3>Project status</h3> <p>The project is still in <strong>early‑stage</strong>:</p> <ul> <li>Most Nix syntax is supported, but not all everything yet.</li> <li>Test-driven approach prevents regressions.</li> <li>CLI and API stability is still evolving.</li> </ul> <h3>Links</h3> <p>Source: https://github.com/hoh/nix-manipulator Announcement: https://discourse.nixos.org/t/announcing-nix-manipulator-nima-structured-edits-for-nix-that-keep-formatting/68513/11</p>

Additional information

Live Stream https://live.fosdem.org/watch/ua2118
Type devroom
Language English

More sessions

1/31/26
Nix and NixOS
UA2.118 (Henriot)
<p>devroom opening</p>
1/31/26
Nix and NixOS
Philippe Ombredanne
UA2.118 (Henriot)
<p>Nixpkgs is massive with the largest, most up-to-date collection of Nix packages, powering reproducible systems and forming the backbone of many projects. But there's a problem: Nix packages' license metadata is a mess. </p> <p>Nix's license tracking uses a custom license ID system that doesn't match the best practice of using SPDX license expressions standards, inconsistently referencing SPDX or ScanCode LicenseDB. The metadata often falls out of sync with the actual code or misrepresents ...
1/31/26
Nix and NixOS
UA2.118 (Henriot)
<p>Since 2015, IndieHosters has specialized in hosting and making accessible free software as a service, from blogs and forums to wikis and online collaboration tools, with a core mission to enable people and organizations to always keep control over their data and privacy in order to achieve data sovereignty.</p> <p>To support this mission, we created libre.sh, a framework of tools that enables us to host free software at scale. It has evolved quite a bit since our initial talk at FOSDEM 2017. ...
1/31/26
Nix and NixOS
Ryan Gibb
UA2.118 (Henriot)
<p>Our digital lives are increasingly fragmented across numerous centralised online services. This model concentrates power, leaving us with minimal technical control over our personal data and online identities. The long-term permanence of these platforms is uncertain, and their commercial incentives are often misaligned with user interests. We propose inverting this model: instead of centralising our data in proprietary silos, let’s centralise our presence under our own control using open, ...
1/31/26
Nix and NixOS
Lars
UA2.118 (Henriot)
<p>With TAPPaaS we are building a small, composable private cloud for homes, communities and small organisations. It should feel like an enterprise‑grade packaged solution, but be built fully with FOSS and declarative Nix/NixOS tooling. Our current design is a 2‑node cluster with a third backup node, using Proxmox as cluster manager, NixOS and flakes for all VMs running platform services. All changes go through GitOps workflows, and services are packaged as NixOS modules that share central ...
1/31/26
Nix and NixOS
Bruce Gain
UA2.118 (Henriot)
<p>Reproducibility remains one of the largest challenges in benchmarking distributed systems, especially when hardware, kernel settings, and dependency versions vary between tests. This talk presents a NixOS-based approach for constructing deterministic, portable benchmark environments for large-scale data infrastructure. We show how Nix’s declarative system configuration, content-addressed builds, and reproducible packaging model allow engineers to isolate performance variables and eliminate ...
1/31/26
Nix and NixOS
UA2.118 (Henriot)
<p>NixOS reproducibility monitoring has historically been limited to the ISO images we ship, because they are a package set small enough to be rebuilt on a single machine. In this talk, we introduce <a href="https://github.com/nix-community/lila">LILA</a>, a decentralized reproducibility monitoring infrastructure for the NixOS community, aimed at removing this limit and allowing a collaborative monitoring of the entirety of nixpkgs!</p>