mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-15 17:51:01 +00:00
44da835ac4
Fixes #367
84 lines
1.9 KiB
Nix
84 lines
1.9 KiB
Nix
{ name, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
options = {
|
|
name = mkOption {
|
|
type = types.str;
|
|
description = ''
|
|
The name of the user account. If undefined, the name of the
|
|
attribute set will be used.
|
|
'';
|
|
};
|
|
|
|
description = mkOption {
|
|
type = types.str;
|
|
default = "";
|
|
example = "Alice Q. User";
|
|
description = ''
|
|
A short description of the user account, typically the
|
|
user's full name.
|
|
'';
|
|
};
|
|
|
|
uid = mkOption {
|
|
type = types.int;
|
|
description = "The user's UID.";
|
|
};
|
|
|
|
gid = mkOption {
|
|
type = types.int;
|
|
default = 20;
|
|
description = "The user's primary group.";
|
|
};
|
|
|
|
isHidden = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
description = "Whether to make the user account hidden.";
|
|
};
|
|
|
|
# extraGroups = mkOption {
|
|
# type = types.listOf types.str;
|
|
# default = [];
|
|
# description = "The user's auxiliary groups.";
|
|
# };
|
|
|
|
home = mkOption {
|
|
type = types.path;
|
|
default = "/var/empty";
|
|
description = "The user's home directory.";
|
|
};
|
|
|
|
createHome = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Create the home directory when creating the user.";
|
|
};
|
|
|
|
shell = mkOption {
|
|
type = types.either types.shellPackage types.path;
|
|
default = "/sbin/nologin";
|
|
example = literalExpression "pkgs.bashInteractive";
|
|
description = "The user's shell.";
|
|
};
|
|
|
|
packages = mkOption {
|
|
type = types.listOf types.package;
|
|
default = [];
|
|
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
|
|
description = ''
|
|
The set of packages that should be made availabe to the user.
|
|
This is in contrast to <option>environment.systemPackages</option>,
|
|
which adds packages to all users.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = {
|
|
|
|
name = mkDefault name;
|
|
|
|
};
|
|
}
|