nixos/nebula: conditionally provision the nebula user

This commit is contained in:
Aaron Andersen 2021-02-09 20:48:23 -05:00
parent b52a8f67dd
commit 9f9e7c181c

View file

@ -192,13 +192,15 @@ in
networking.firewall.allowedUDPPorts = [ cfg.listen.port ];
# Create the service user and its group.
users.users."nebula" = {
name = "nebula";
users = mkIf cfg.tun.disable {
users.nebula = {
group = "nebula";
description = "Nebula service user";
isSystemUser = true;
packages = [ cfg.package ];
};
users.groups."nebula" = {};
groups.nebula = {};
};
};
}