# Does it matter what order things are listed in configuration.nix?

**URL:** https://discourse.nixos.org/t/does-it-matter-what-order-things-are-listed-in-configuration-nix/13373
**Category:** Help
**Created:** [May 31, 2021, 5:36pm UTC](https://discourse.nixos.org/t/does-it-matter-what-order-things-are-listed-in-configuration-nix/13373 "2021-05-31T17:36:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bgibson](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bgibson/32/4298_2.png) [@bgibson](https://discourse.nixos.org/u/bgibson)
#### Post date: [May 31, 2021, 5:36pm UTC](https://discourse.nixos.org/t/does-it-matter-what-order-things-are-listed-in-configuration-nix/13373/1 "2021-05-31T17:36:06Z")

</div>

I assume that since configuration.nix is declarative not imperative, then the order in which you list the various properties doesn’t matter.

But just want to verify - are there any order-dependent properties in configuration.nix that need to come before others?

---

<div class="post-metadata">

### Author: ![fricklerhandwerk](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fricklerhandwerk/32/2029_2.png) [@fricklerhandwerk](https://discourse.nixos.org/u/fricklerhandwerk)
#### Post date: [May 31, 2021, 7:23pm UTC](https://discourse.nixos.org/t/does-it-matter-what-order-things-are-listed-in-configuration-nix/13373/2 "2021-05-31T19:23:14Z")

</div>

Within the file, order of declarations does not matter, and generally all attribute-set typed declarations are unordered. In most lists order is not important _in practice_, but really this depends on the specific case - lists are inherently ordered and sometimes this is put to good use. One example are overlays, or configuration options that are evaluated in order (such as filters with wildcards, thinking of `ssh` config here).
