Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.57 KB

File metadata and controls

57 lines (47 loc) · 1.57 KB

User accounts of this configuration.

Attribute set of the following options:

Options

  • description (string): Full description of the username, e.g. the full name. Default: empty. Also used for git.name if that is unset
  • admin (boolean): Grant this user administrative rights (sudo, NetworkManager). Default: false
  • sshKeys (list of string): SSH public keys that may log in as this user. Default: empty
  • home (path): Path to this user’s home directory. Default: /home/${username}
  • git: Submodule
    • name (null or string): Full name of this user for Git commits. When null, toplevel description is used as a fallback.
    • email (null or string): Email address of this user for Git commits. When null, commits can’t be created.
    • key (null or string): GPG key ID to sign commits with. When null, commits signing is disabled.

Example

# flake.nix
{
  # inputs = { ... };
  outputs = { aquaris, self, ... }: aquaris self {
    users.alice = {
      description = "Alice Exampleuser";

      sshKeys = [
        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAe61mAVmVqVWc+ZGoJnWDhMMpVXGwVFxeYH+QI0XSoo"
      ];

      git = {
        email = "alice@example.org";
        key = "C743EE077172986F860FC0FE2F6FE1420970404C";
      };
    };
  };
}
# machine/example/default.nix
{ aquaris, ... }: {
  aquaris.users = aquaris.lib.merge [
    { inherit (aquaris.cfg.users) alice; }
    { alice.admin = true; }
  ];
}