# Pre-RFC: Decouple services using structured typing

**URL:** https://discourse.nixos.org/t/pre-rfc-decouple-services-using-structured-typing/58257
**Category:** RFCs
**Created:** [January 3, 2025, 11:13pm UTC](https://discourse.nixos.org/t/pre-rfc-decouple-services-using-structured-typing/58257 "2025-01-03T23:13:17Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![ibizaman](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ibizaman/32/6154_2.png) [@ibizaman](https://discourse.nixos.org/u/ibizaman)
#### Post date: [January 8, 2025, 9:44am UTC](https://discourse.nixos.org/t/pre-rfc-decouple-services-using-structured-typing/58257/9 "2025-01-08T09:44:37Z")

</div>

As a concrete example of the use of this RFC and specifically the backup contract.

> [@Breaking changes announcement for unstable](https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/62):
>
> The dhcpcd service (networking.useDHCP) has been hardened and now runs exclusively as the “dhcpcd” user (no root at all). ([PR #336988](https://github.com/NixOS/nixpkgs/pull/336988)) Most users shouldn’t see any difference, but if you were relying on the root privileges in networking.dhcpcd.runHook you will have to write specific sudo or polkit rules to allow dhcpcd to perform privileged actions. Also, as part of these changes, the DHCP lease files directory has also been moved from /var/db/dhcpcd to /var/lib/dhcpcd. This migration is perfo…

This breaking change changes the location of a directory. The end user can only know about this by reading this thread. With a backup contract, this would be expressed in code without the user even needing to know about it.

---

_[View the full topic](https://discourse.nixos.org/t/pre-rfc-decouple-services-using-structured-typing/58257)._
