Home Manager

The Home Manager module installs pedantix and, optionally, writes a global pedantix.toml to $XDG_CONFIG_HOME/pedantix/pedantix.toml.

Options

programs.pedantix.enable

Whether to enable pedantix, the pedantic nix formatter.

Type: boolean

Default:

false

Example:

true

programs.pedantix.package

The pedantix package to install. The default wrapper ships nixfmt, alejandra and nixpkgs-fmt on PATH; use the unwrapped pedantix package if you provide the base formatter yourself.

Type: package

Default:

pedantix.packages.${system}.pedantix-wrapped

programs.pedantix.settings

Global fallback configuration, using the same structure as pedantix.toml.

Written to $XDG_CONFIG_HOME/pedantix/pedantix.toml.

Type: TOML value

Default:

{ }

Example:

{
  preset = "nixos-module";
  lets.sort = true;
}

Full Example

{
  imports = [ inputs.pedantix.homeModules.default ];

  programs.pedantix = {
    enable = true;
    settings = {
      preset = "nixos-module";
      lets.sort = true;
    };
  };
}