nix-community/nixos-facter-modules

A series of NixOS modules to be used in conjunction with https://github.com/nix-community/nixos-facter [maintainer=@brianmcgee,@Mic92]

Nix

178

205 commits

updated Mar 30, 2026

See the code

README

nixos-facter-modules

[!WARNING] This repository is deprecated. The modules have been upstreamed to nixpkgs. Please use the nixpkgs version instead:

{
  hardware.facter.reportPath = ./facter.json;
}

See the nixpkgs documentation for more details.


A series of NixOS modules to be used in conjunction with NixOS Facter.

With a similar goal to NixOS Hardware, these modules are designed around fine-grained feature detection as opposed to system models. This is made possible by the hardware report provided by NixOS Facter.

By default, these modules enable or disable themselves based on detected hardware.

For more information, see the docs.

Getting started

To generate a hardware report run the following:

$ nix --extra-experimental-features "flakes nix-command" run github:nix-community/nixos-facter > facter.json

Then use the generated facter.json with the NixOS module as follows:

NixOS with flakes

We are currently assuming that a the system uses disko, so we have not implemented fileSystems configuration. If you don't use disko, you have to currently specify that part of the configuration yourself or take it from nixos-generate-config.

# flake.nix
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  };

  outputs =
    inputs@{ nixpkgs, ... }:
    {
      nixosConfigurations.basic = nixpkgs.lib.nixosSystem {

        modules = [
          { config.hardware.facter.reportPath = ./facter.json; }
          # If you want to test out nixos-facter, you can add these dummy
          # values to make the configuration valid. Note that this likely won't boot if
          # it doesn't match your own partitioning
          # {
          #   users.users.root.initialPassword = "fnord23";
          #   boot.loader.grub.devices = lib.mkForce [ "/dev/sda" ];
          #   fileSystems."/".device = lib.mkDefault "/dev/sda";
          # }
          # ...
          ## You also need to define your bootloader if you are not using grub
          #{ boot.loader.systemd-boot.enable = true; }
        ];
      };
    };
}

Non-flakes NixOS

# configuration.nix
{
  config.hardware.facter.reportPath = ./facter.json;
}
nix
nix-community-buildbot
nixos

nix-community/nixos-facter-modules

A series of NixOS modules to be used in conjunction with https://github.com/nix-community/nixos-facter [maintainer=@brianmcgee,@Mic92]

Nix

178

205 commits

updated Mar 30, 2026

See the code

README

nixos-facter-modules

[!WARNING] This repository is deprecated. The modules have been upstreamed to nixpkgs. Please use the nixpkgs version instead:

{
  hardware.facter.reportPath = ./facter.json;
}

See the nixpkgs documentation for more details.


A series of NixOS modules to be used in conjunction with NixOS Facter.

With a similar goal to NixOS Hardware, these modules are designed around fine-grained feature detection as opposed to system models. This is made possible by the hardware report provided by NixOS Facter.

By default, these modules enable or disable themselves based on detected hardware.

For more information, see the docs.

Getting started

To generate a hardware report run the following:

$ nix --extra-experimental-features "flakes nix-command" run github:nix-community/nixos-facter > facter.json

Then use the generated facter.json with the NixOS module as follows:

NixOS with flakes

We are currently assuming that a the system uses disko, so we have not implemented fileSystems configuration. If you don't use disko, you have to currently specify that part of the configuration yourself or take it from nixos-generate-config.

# flake.nix
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  };

  outputs =
    inputs@{ nixpkgs, ... }:
    {
      nixosConfigurations.basic = nixpkgs.lib.nixosSystem {

        modules = [
          { config.hardware.facter.reportPath = ./facter.json; }
          # If you want to test out nixos-facter, you can add these dummy
          # values to make the configuration valid. Note that this likely won't boot if
          # it doesn't match your own partitioning
          # {
          #   users.users.root.initialPassword = "fnord23";
          #   boot.loader.grub.devices = lib.mkForce [ "/dev/sda" ];
          #   fileSystems."/".device = lib.mkDefault "/dev/sda";
          # }
          # ...
          ## You also need to define your bootloader if you are not using grub
          #{ boot.loader.systemd-boot.enable = true; }
        ];
      };
    };
}

Non-flakes NixOS

# configuration.nix
{
  config.hardware.facter.reportPath = ./facter.json;
}
nix
nix-community-buildbot
nixos

Significant stargazers

(top 24 of 28)

Julian Stecklina

368 followers · starred Jan 2025

Kasper Kondzielski

93 followers · starred Jan 2025

Wael Nasreddine

220 followers · starred Jan 2025

Lucas Servén Marín

424 followers · starred Sep 2025