summaryrefslogtreecommitdiff
path: root/modules/users/group.nix
blob: cfda76f3497ab662952ab251d0f4f40d0bd44fd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ name, lib, ... }:

with lib;

{
  options = {
    name = mkOption {
      type = types.str;
      description = lib.mdDoc ''
        The group's name. If undefined, the name of the attribute set
        will be used.
      '';
    };

    gid = mkOption {
      type = mkOptionType {
        name = "gid";
        check = t: isInt t && t > 501;
      };
      description = lib.mdDoc "The group's GID.";
    };

    members = mkOption {
      type = types.listOf types.str;
      default = [];
      description = lib.mdDoc "The group's members.";
    };

    description = mkOption {
      type = types.str;
      default = "";
      description = lib.mdDoc "The group's description.";
    };
  };

  config = {

    name = mkDefault name;

  };
}