# NARF
_NixOS Advanced Rebuild Flake_
[](CHANGELOG.md)
[](https://github.com/farbzen/narf/actions/workflows/rust.yml?query=branch%3Amain+event%3Apush)
[](flake.nix)
[](Cargo.toml)
[](https://farbzen.github.io/narf/)
[](LICENSE)
[](https://ko-fi.com/farbzen)
[Overview](#overview) • [Features](#features) •
[Getting Started](#getting-started) • [Documentation](#documentation)
NARF rebuilds a NixOS configuration flake and records every rebuild as a git commit; it is meant for NixOS users who manage their systems with a flake in a git repository.
A plain nixos-rebuild leaves no trace in the configuration repository. NARF
wraps update, rebuild and commit into one step, so the git history of the flake
doubles as a log of every generation built on each host.
The repository consists of the following applications:
narf/.narf-tui/.-c).-u) or selected ones (-U)
before rebuilding.-p) and push after (-P) the rebuild, with
unpushed rebuild commits squashed into one unless -S is given.-d), build without switching (-b) and pushing
existing commits without rebuilding (-n).-y) and show a trace of
failing rebuilds (-t).~/.config/narf/flake, the
host defaults to the current hostname.nix-command and
flakes featuresTry both applications without installing:
nix run github:farbzen/narf -- --help
nix run github:farbzen/narf#narf-tui
To install them on NixOS, add the flake as an input and its overlay to the configuration:
inputs.narf.url = "github:farbzen/narf";
# in a NixOS module:
nixpkgs.overlays = [narf.overlays.default];
environment.systemPackages = [pkgs.narf];
[!NOTE]
narfandnarf-tuiare the same derivation; installing one of them puts both binaries on thePATH.
Without the flake, copy package.nix into the configuration
and add (pkgs.callPackage ./narf.nix {}) to environment.systemPackages.
The full examples are in docs/installation.md.
narf --update --push # update inputs, rebuild, commit and push
narf --dry # only show what would be done
narf -U nixpkgs -b # update only nixpkgs, build without switching
narf-tui # interactive frontend
Without --flake, NARF reads the flake path from ~/.config/narf/flake and
offers to save a new --flake value there. All options: narf --help and
docs/usage.md.
The documentation is published at https://farbzen.github.io/narf/; its
source lives in docs/:
See LICENSE.