Presets
A preset provides a set of base values that your explicit settings layer on top of. Select one with the top-level preset key:
preset = "nixos-module"
# anything below overrides the preset
[lets]
sort = true
Note:
When you set
[[overrides]]yourself, note that a matching override list replaces the discovered list, while preset-provided overrides still combine!
The following presets are currently in pedantix:
alphabetical
Preset that sorts every expression (except lists) alphabetically.
[lets]
sort = true
[attrs]
sort = true
[args]
sort = true
[inherits]
sort = true
nixos-module
Preset for NixOS / Home Manager modules.
[args]
first = ["config", "lib", "pkgs", "options", "modulesPath", "utils"]
last = ["<defaulted>", "..."]
[attrs]
first = ["imports", "options", "config", "enable", "package"]
last = ["meta"]
nixpkgs-package
Preset for nixpkgs-style package derivations.
[args]
first = ["lib", "stdenv", "fetchurl", "fetchFromGitHub", "fetchFromGitLab"]
last = ["<defaulted>", "..."]
[attrs]
first = [
"pname",
"version",
"src",
"outputs",
"patches",
"postPatch",
"strictDeps",
"nativeBuildInputs",
"buildInputs",
"propagatedBuildInputs",
"cargoLock",
"cargoHash",
"vendorHash",
"npmDepsHash",
"configureFlags",
"cmakeFlags",
"mesonFlags",
"makeFlags",
"buildFlags",
"env",
"preConfigure",
"postConfigure",
"preBuild",
"buildPhase",
"postBuild",
"doCheck",
"nativeCheckInputs",
"checkInputs",
"checkFlags",
"preCheck",
"checkPhase",
"postCheck",
"preInstall",
"installPhase",
"postInstall",
"doInstallCheck",
"nativeInstallCheckInputs",
"installCheckPhase",
"preFixup",
"postFixup",
]
last = ["passthru", "meta"]
[[overrides]]
path = "**.src"
attrs.first = [
"url",
"owner",
"repo",
"rev",
"tag",
"hash",
"sha256",
"fetchSubmodules",
]
[[overrides]]
path = "**.meta"
attrs.first = [
"description",
"longDescription",
"homepage",
"changelog",
"license",
"sourceProvenance",
"maintainers",
"platforms",
"badPlatforms",
"mainProgram",
]