diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 446a311807cc..aff562c00eb1 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -335,6 +335,7 @@ kapacitor = 308; solr = 309; alerta = 310; + minetest = 311; # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! @@ -630,6 +631,7 @@ kapacitor = 308; solr = 309; alerta = 310; + minetest = 311; # When adding a gid, make sure it doesn't match an existing # uid. Users and groups with the same name should have equal diff --git a/nixos/modules/services/games/minetest-server.nix b/nixos/modules/services/games/minetest-server.nix index 2de42f20f6cc..98e69c6dc0ea 100644 --- a/nixos/modules/services/games/minetest-server.nix +++ b/nixos/modules/services/games/minetest-server.nix @@ -84,7 +84,9 @@ in home = "/var/lib/minetest"; createHome = true; uid = config.ids.uids.minetest; + group = "minetest"; }; + users.groups.minetest.gid = config.ids.gids.minetest; systemd.services.minetest-server = { description = "Minetest Server Service"; @@ -93,6 +95,7 @@ in serviceConfig.Restart = "always"; serviceConfig.User = "minetest"; + serviceConfig.Group = "minetest"; script = '' cd /var/lib/minetest