February 2025
-
Managing databases users using nix
Recently I had the following challenge: manage database (robotic) users using nix. More specifically I wanted to declare a list of MariaDB/MySQL users, alongside passwords, and permissions using nix. And while nix has some options for this (e.g. services.mysql.ensureUsers.*.name). Some aspects can’t be declared with nix options like the credentials or its permissions for given…
