# Using hashes for \`stateVersion\` instead of human-readable strings

**URL:** https://discourse.nixos.org/t/using-hashes-for-stateversion-instead-of-human-readable-strings/61823
**Category:** Development
**Created:** [March 18, 2025, 4:08am UTC](https://discourse.nixos.org/t/using-hashes-for-stateversion-instead-of-human-readable-strings/61823 "2025-03-18T04:08:05Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [March 18, 2025, 5:20am UTC](https://discourse.nixos.org/t/using-hashes-for-stateversion-instead-of-human-readable-strings/61823/2 "2025-03-18T05:20:03Z")

</div>

I mean if we’re going to be radically redesigning `stateVersion`, let’s do it proper. Don’t use a single global `stateVersion` variable. Each component that needs `stateVersion` maintains its own setting for that, and the setting is _just a freakin number_, not a NixOS release.

```auto
services.postgresql.stateVersion = 6;

```

---

_[View the full topic](https://discourse.nixos.org/t/using-hashes-for-stateversion-instead-of-human-readable-strings/61823)._
