Skip to content

Commit

Permalink
nixos/ids: Link to RFC #52 and explain that static IDs are not allowed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvishJerricco committed Dec 23, 2024
1 parent 3d435ca commit 62ea9da
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions nixos/modules/misc/ids.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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, ... }:

Expand Down

0 comments on commit 62ea9da

Please sign in to comment.