> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jylhis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Users

> Configure user accounts with metadata for git and applications

Marchyo manages user accounts through the `marchyo.users` option. Each user gets a system account with associated metadata used by git, applications, and Home Manager.

## Basic usage

```nix theme={}
marchyo.users.myuser = {
  fullname = "Your Name";
  email = "your@email.com";
};
```

This creates a user account named `myuser` with the provided name and email configured across git and other applications.

## Options

| Option                          | Type            | Default | Description                                                                                                                         |
| ------------------------------- | --------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `marchyo.users.<name>.enable`   | `bool`          | `true`  | Whether to apply Marchyo configuration to this user                                                                                 |
| `marchyo.users.<name>.fullname` | `string`        | —       | Full name (used in git config and applications)                                                                                     |
| `marchyo.users.<name>.email`    | `string`        | —       | Email address (used in git config and applications)                                                                                 |
| `marchyo.users.<name>.uid`      | `int` or `null` | `null`  | Numeric user id. On NixOS sets `users.users.<name>.uid`; on macOS opts the user into declarative login-shell management (see below) |

## Login shell

Bash (5.x, `bashInteractive`) is the Marchyo default login shell on every platform.

On **NixOS** this is set via `users.defaultUserShell` (overridable with your own value).

On **macOS** (nix-darwin), changing an account's shell requires the user to be
listed in `users.knownUsers` with the account's exact `uid` — a mismatch aborts
activation, so Marchyo does not guess. Provide the uid to opt in (the first
macOS user is `501`):

```nix theme={}
marchyo.users.myuser = {
  fullname = "Your Name";
  email = "your@email.com";
  uid = 501; # check with: id -u
};
```

With the uid set, nix-darwin switches the login shell to bash declaratively.
Without it, bash is still registered in `/etc/shells`, so you can switch once
manually:

```bash theme={}
chsh -s /run/current-system/sw/bin/bash
```

## Multiple users

You can define multiple users:

```nix theme={}
marchyo.users = {
  alice = {
    fullname = "Alice Smith";
    email = "alice@example.com";
  };
  bob = {
    fullname = "Bob Jones";
    email = "bob@example.com";
  };
};
```

## Disabling a user

To keep a user definition but exclude it from Marchyo configuration:

```nix theme={}
marchyo.users.myuser = {
  enable = false;
  fullname = "Your Name";
  email = "your@email.com";
};
```
