Note
Status: beta
NixOS Facter aims to be an alternative to projects such as NixOS Hardware and nixos-generate-config. It solves the problem of bootstrapping NixOS configurations by deferring decisions about hardware and other aspects of the target platform to NixOS modules.
We do this by first generating a machine-readable report (JSON) which captures detailed information about the machine or virtual environment it was executed within.
This report is then passed to a series of NixOS modules which can make a variety of decisions, some simple, some more complex, enabling things like automatic configuration of network controllers or graphics cards, USB devices, and so on.
This repository contains the binary for generating the report.
NixOS Facter Modules contains the necessary NixOS modules for making use of the report in a NixOS configuration.
For more information, please see the docs.
To generate a report using nixos-facter
from nixpkgs:
# you must run this as root
❯ sudo nix run --option experimental-features "nix-command flakes" nixpkgs#nixos-facter -- -o facter.json
To use the latest development version from this flake:
# you must run this as root
❯ sudo nix run \
--option experimental-features "nix-command flakes" \
--option extra-substituters https://numtide.cachix.org \
--option extra-trusted-public-keys numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE= \
github:numtide/nixos-facter -- -o facter.json
Contributions are always welcome!
This software is provided free under GNU GPL v3.
This project is supported by Numtide.
We’re a team of independent freelancers that love open source. We help our customers make their project lifecycles more efficient by:
- Providing and supporting useful tools such as this one.
- Building and deploying infrastructure, and offering dedicated DevOps support.
- Building their in-house Nix skills, and integrating Nix with their workflows.
- Developing additional features and tools.
- Carrying out custom research and development.
Contact us if you have a project in mind, or if you need help with any of our supported tools, including this one.
We'd love to hear from you.