From 62ea9dacbaac6ad938de0f1c58844c5e3e28e0c2 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Mon, 23 Dec 2024 00:47:56 -0500 Subject: [PATCH] nixos/ids: Link to RFC #52 and explain that static IDs are not allowed. --- nixos/modules/misc/ids.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index a2c0438801ad7a..fcdffc52096750 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -2,12 +2,15 @@ # central list to prevent id collisions. # IMPORTANT! -# We only add static uids and gids for services where it is not feasible -# to change uids/gids on service start, for example a service with a lot of -# files. Please also check if the service is applicable for systemd's -# DynamicUser option and does not need a uid/gid allocation at all. -# Systemd can also change ownership of service directories using the -# RuntimeDirectory/StateDirectory options. +# +# https://github.com/NixOS/rfcs/blob/master/rfcs/0052-dynamic-ids.md +# +# Use of static ids is deprecated within NixOS. Dynamic allocation is +# required, barring special circumstacnes. Please check if the service +# is applicable for systemd's DynamicUser option and does not need a +# uid/gid allocation at all. Systemd can also change ownership of +# service directories using the RuntimeDirectory/StateDirectory +# options. { lib, ... }: