Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Applications

Platforms: gh, senpai, tmux, yazi, comma, nixvim, the language registry, Ghostty, kitty, mpv, VSCodium, IntelliJ IDEA and Signal run on NixOS and nix-darwin. The rest are NixOS only. See Darwin.

Application modules under othrys.apps.*, split into CLI and GUI categories.

Application modules curate each app’s integration (persistence, theming, sane settings). Personal choices (search engines, wordmarks, tokens) are options the consuming fleet sets.

CLI Applications (modules/apps/cli/)

No desktop environment required, so these are usable on servers and headless systems.

ModuleOptionDescription
Nixvimothrys.apps.nixvimNeovim configured via Nix (sub-modules for plugins/languages)
Languagesothrys.apps.languages.<name>Per-language toolchains shared by the PATH and both editors
Developmentothrys.apps.developmentDevelopment tools bundle, direnv with its allow database persisted
GitHub CLIothrys.apps.ghgh with its settings, the git credential helper, a token file for a headless host and read-only commands pre-approved for Claude Code and Codex
senpaiothrys.apps.senpaiTerminal IRC client for a bouncer, with the password read from a file at connect time
tmuxothrys.apps.tmuxTerminal multiplexer
Yaziothrys.apps.yaziTerminal file manager
Commaothrys.apps.commaRun uninstalled programs with nix-index, whose command-not-found handler names the package for a missing command

The assistant modules under modules/apps/cli/ai/ are listed on the AI Assistants page.

Nixvim and Comma each import a Home Manager module from a flake this library locks, nixvim and nix-index-database. A consuming flake declares neither input. There is no package option for either, since the module builds what it installs, so a consumer who wants another revision makes this library’s input follow their own.

inputs = {
  nixvim.url = "github:nix-community/nixvim";
  othrys.inputs.nixvim.follows = "nixvim";
};

Nixvim builds its plugins from the nixpkgs the host’s own package set was built from, whichever revision of the module is in use.

GUI Applications (modules/apps/gui/)

Require a desktop environment.

ModuleOptionDescription
Ghosttyothrys.apps.ghosttyTerminal emulator with rich options
Kittyothrys.apps.kittyAlternative terminal emulator
Floorpothrys.apps.floorpFirefox-based browser
Chromiumothrys.apps.chromiumUngoogled Chromium with extensions from pinned CRX files
VSCodiumothrys.apps.vscodeVSCodium editor, wired to the shared language toolchains
Vesktopothrys.apps.vesktopDiscord client with Wayland support
Discordothrys.apps.discordOfficial Discord client, with ~/.config/discord persisted at mode 0700
IDEAothrys.apps.ideaIntelliJ IDEA with a curated plugin catalogue. Requires othrys.apps.languages.java
Signalothrys.apps.signalSignal messenger
OBSothrys.apps.obsScreen recording/streaming. Enables othrys.services.virtualcamera, and builds with CUDA when othrys.hardware.nvidia is on
Picardothrys.apps.picardMusicBrainz tagger. NixOS only, since its pyqt6 fails to build on darwin
Plexampothrys.apps.plexampPlex music player
RustDeskothrys.apps.rustdeskRemote desktop client. Persists ~/.config/rustdesk, and forceX11 starts the launcher through XWayland
Remminaothrys.apps.remminaRemote desktop client for VNC, RDP, SPICE and SSH. Persists ~/.config/remmina and ~/.local/share/remmina at mode 0700, and starts nothing at login
LocalSendothrys.apps.localsendLocal file sharing
MPVothrys.apps.mpvMedia player

The modules under modules/apps/gui/gaming/ are listed on the Gaming page.

GitHub CLI

othrys.apps.gh installs gh and writes its config.yml. gitProtocol, editor and aliases cover the common keys, and settings takes any other key and is merged over them, so a key set there wins. editor follows othrys.system.defaultEditor. extensions takes a list of packages.

othrys.apps.gh = {
  enable = true;
  aliases.co = "pr checkout";
  settings.pager = "less -FRX";
};

The module does not log in. On a desktop, run gh auth login once. It runs GitHub’s OAuth device flow, which shows a code to enter in a browser, and it stores the resulting token in the Secret Service keyring when one is running. othrys.desktop.keyring provides that keyring on a graphical host. Without one gh falls back to a plain file, ~/.config/gh/hosts.yml. Under impermanence ~/.config/gh is persisted at mode 0700 for the primary user, which keeps the account name in both cases and the token in the second.

With credentialHelper.enable, which is on by default, git asks gh for credentials on the URLs in credentialHelper.hosts. A clone, fetch or push over HTTPS then uses the gh login, and no second credential is stored for git. A remote reached over SSH is not affected.

A headless host has no browser for the device flow and no keyring to hold the result. tokenFile names a runtime path that a secrets provider writes, and the file has to be readable by the primary user.

othrys.apps.gh = {
  enable = true;
  gitProtocol = "https";
  tokenFile = "/run/secrets/gh-token";
};

gh reads a token only from the GH_TOKEN environment variable, so with tokenFile set the gh on the PATH is a wrapper around the real program. The wrapper reads the file, sets GH_TOKEN in its own process and replaces that process with gh. It guarantees three things:

  • The Nix store holds the path of the file and never its content, since the option refuses a path literal and a store path.
  • The shell never has the variable, so no other program started from it inherits the token.
  • No process argument carries the token, so it does not appear in the process list.

The token is in the environment of the running gh and of the programs gh starts, such as git, the editor and an extension. The completions and the man pages are the ones gh ships. The git credential helper runs the wrapper as well, so git over HTTPS works on such a host without a login. A GH_TOKEN that is already set is kept. When the file is missing or unreadable the wrapper says so on stderr and runs gh without it, so gh auth status reports the login the host really has.

When othrys.apps.ai.claude-code is enabled as well, the module adds the read-only gh commands to the Claude Code allow-list, and an agent reads GitHub without a prompt. The entries are gh issue view, gh issue list, gh pr view, gh pr list, gh pr diff, gh pr checks, gh run view, gh run list, gh repo view, gh release view, gh release list and gh search, each in the Bash(gh pr view:*) form. A command that creates, edits, merges, closes or comments stays prompted, and so do gh auth and gh api, since gh api sends any request. claudeCode.allowReadOnly = false leaves the entries out. The lists are a convenience and not a boundary, as AI Assistants explains.

When othrys.apps.ai.codex is enabled, the same twelve commands become allow rules in Codex’s othrys-gh.rules. Codex runs an allowed command outside its sandbox, which has no network, so this is what lets Codex read GitHub without asking. codex.allowReadOnly = false leaves the rules out.

tmux

othrys.apps.tmux turns on Home Manager’s programs.tmux for the primary user, so it takes effect only on a host that imports the home export. It sets the terminal to tmux-256color, which carries italics, the escape time to 10 ms in place of tmux’s half second, which stalls modal editors after Escape, and the history limit to 50000 lines. All three are defaults, so a host sets its own under programs.tmux without lib.mkForce.

othrys.apps.tmux.enable = true;

The status line, the current window, the active pane border and the message line are coloured from othrys.theme.palette. On a host with no palette the backgrounds and the text keep the terminal’s default colours and the current window and the active border are blue. The Stylix adapter turns its own tmux target off while this module is on, so the two themes never mix, and a host that wants the Stylix theme sets stylix.targets.tmux.enable = lib.mkForce true.

On nix-darwin the module also installs the tmux-256color terminfo entry, since the database macOS ships has none and Apple’s own programs inside tmux would not know the terminal.

The module sets no key bindings, no prefix and no mouse mode, so tmux’s defaults apply. A host sets those under programs.tmux in its own Home Manager configuration.

Options

  options.othrys.apps.tmux = {
    enable = lib.mkEnableOption "tmux terminal multiplexer";
  };

senpai

othrys.apps.senpai configures senpai, a terminal IRC client built for a bouncer, through Home Manager’s programs.senpai for the primary user. It runs on NixOS and nix-darwin, and on darwin Home Manager writes the configuration to ~/Library/Application Support/senpai. soju is the bouncer module, and IRC with soju and senpai sets up both.

othrys.apps.senpai = {
  enable = true;
  address = "irc.example.com";
  nickname = "alice";
  passwordFile = "/run/secrets/senpai-password";
};

address defaults to soju’s loopback listener, irc+insecure://127.0.0.1:<port>, when othrys.services.soju is on the same host, and has no default otherwise. A bare host name connects with TLS on port 6697. nickname never has a default. The module refuses either one unset and names the option in its message.

passwordFile becomes password-cmd, a cat of the file. senpai runs the command without a shell and reads its first line each time it connects, so the password stays out of the Nix store and the configuration file, and the file has to be readable by the primary user. settings.password and settings.password-cmd are refused.

senpai uses nickname as the SASL user name unless settings.username is set. On a soju bouncer that user name is the soju account, so a nickname that differs from the account name needs settings.username. settings takes any other senpai.scfg directive and is merged over what the module writes.

~/.cache/senpai is persisted, since it holds the last open buffer and the read marker, lastbuffer-*.txt and laststamp-*.txt. The configuration is a Home Manager link and is not persisted.

Options

  options.othrys.apps.senpai = {
    enable = lib.mkEnableOption "the senpai IRC client";

    address = lib.mkOption {
      type = lib.types.nullOr lib.types.str;
      default =
        if soju.enable
        then "irc+insecure://127.0.0.1:${toString soju.port}"
        else null;
      defaultText = lib.literalExpression ''"irc+insecure://127.0.0.1:''${port}" when othrys.services.soju.enable is on, null otherwise'';
      example = "irc.example.com:6697";
      description = ''
        Server senpai connects to, as `host[:port]` or an `ircs://`,
        `irc://` or `irc+insecure://` URL. A bare host uses TLS on port
        6697. With `othrys.services.soju` on the same host, the default is
        soju's plaintext listener on loopback.
      '';
    };

    nickname = lib.mkOption {
      type = lib.types.nullOr lib.types.str;
      default = null;
      example = "alice";
      description = ''
        Nickname senpai registers with. senpai also uses it as the SASL
        user name unless `settings.username` is set, which is the soju
        account name when the server is a soju bouncer.
      '';
    };

    passwordFile = lib.mkOption {
      type = lib.types.nullOr othrysTypes.secretPath;
      default = null;
      example = "/run/secrets/senpai-password";
      description = ''
        Runtime path to a file holding the SASL password, readable by the
        primary user. senpai reads its first line through `password-cmd`
        each time it connects, so the password stays out of the Nix store
        and the configuration file.
      '';
    };

    settings = lib.mkOption {
      type = lib.types.attrsOf lib.types.anything;
      default = {};
      example = {
        username = "alice";
        channel = ["#nixos"];
        highlight = ["alice"];
      };
      description = ''
        Further `senpai.scfg` directives, merged over the ones this module
        writes. See {manpage}`senpai(5)`. `password` and `password-cmd` are
        refused here, since `passwordFile` covers both without writing the
        secret into the store.
      '';
    };
  };

Kitty

Remote control is accepted on a unix socket only. Each kitty process listens on $XDG_RUNTIME_DIR/kitty-<pid>.sock, a directory other users cannot read, and kitty @ inside the terminal finds it through KITTY_LISTEN_ON. Control sequences written to the terminal itself are ignored, so the output of a program, or of a remote host over SSH, cannot drive the windows. macOS sets no XDG_RUNTIME_DIR, so on darwin the socket is in $TMPDIR, which is private to the user there. Ghostty takes ghostty-bin on darwin, and yazi installs no wl-clipboard there.

extraSettings takes kitty.conf keys and is merged over the defaults the module writes, so a key set there wins.

othrys.apps.kitty = {
  enable = true;
  extraSettings = {
    scrollback_lines = "50000";
    tab_bar_style = "fade";
  };
};

Ghostty

Ghostty measures its scrollback in bytes and not in lines. scrollbackLimit is that byte count for each terminal surface, and it defaults to Ghostty’s own 10 MB. It replaces scrollbackLines, whose default of 10000 was written as 10000 bytes, about a hundred lines of plain text. Setting the old option now fails with a message naming the new one.

othrys.apps.ghostty = {
  enable = true;
  scrollbackLimit = 50000000;
};

extraSettings takes Ghostty config keys and is merged over what the module writes. A value is a string, a number, a boolean, or a list of those for a key that repeats, such as keybind. A nested attribute set is refused, since the config file is flat.

Vesktop

settings is written to Vesktop’s settings.json over the module defaults and accepts any JSON value.

Remmina

othrys.apps.remmina installs Remmina for the primary user through Home Manager’s services.remmina. Remmina connects to VNC, RDP, SPICE and SSH servers. The darwin export does not include it yet, since it has not been run there. macOS ships Screen Sharing.app, which covers VNC alone.

othrys.apps.remmina.enable = true;

Home Manager would start remmina --icon as a user service at every login, which keeps a tray icon and a process running. The module sets systemdService.enable to false with mkDefault, so Remmina runs only when it is opened. A host that wants the login service back sets it for the user.

home-manager.users.alice.services.remmina.systemdService.enable = true;

Connection profiles live in ~/.local/share/remmina and the preferences in ~/.config/remmina/remmina.pref. Where a saved password goes depends on the host. With a Secret Service running, which othrys.desktop.keyring provides on a graphical host, Remmina stores each password in the keyring and the profile keeps a placeholder. Without one it encrypts the password into the profile file with 3DES, keyed by the secret in remmina.pref. Losing that file makes every saved password unreadable, and anyone who can read both directories can decrypt them. Under impermanence both directories are persisted at mode 0700 for that reason.

Remmina’s VNC client can connect to macOS Screen Sharing. It answers Apple’s authentication, security type 30, with the macOS account’s username and password, so the Mac needs no separate VNC password. Classic VNC is not encrypted. Connect over a private network, or turn on the SSH tunnel in the connection’s SSH settings.

Options

  options.othrys.apps.remmina = {
    enable = lib.mkEnableOption "Remmina remote desktop client";
  };

Floorp

The browser force-installs a curated extension set, Sidebery, Bitwarden and uBlock Origin, through othrys.apps.floorp.extensions. Each entry names a versioned download URL and its hash, so the file is fetched at build time and installed from the Nix store rather than pulled from the add-on site at first start. Replace the set to drop one. A definition replaces the whole default, so a host that wants one more extension merges it over options.othrys.apps.floorp.extensions.default. The option’s example does that for Violentmonkey, which is not in the default set because a userscript manager runs whatever scripts it is given with page access on the sites they match. The built-in password manager is off beside Bitwarden (builtinPasswordManager), tracking protection exempts nothing until a host lists sites in trackingProtectionExemptions, and the theme follows othrys.theme.polarity. The browser chrome is styled from othrys.theme.palette, and on a host with no palette no stylesheet is written.

search.extraEngines adds search engines over the curated set. Each engine is an attribute set of JSON values in the shape Home Manager documents for programs.firefox.profiles.<name>.search.engines.

Chromium

othrys.apps.chromium installs Ungoogled Chromium for the primary user through Home Manager, and persists ~/.config/chromium at mode 0700. Nothing is installed system-wide, so a host whose user Home Manager does not manage gets no browser.

othrys.apps.chromium.enable = true;

commandLineArgs passes launch arguments through Home Manager’s wrapper, and package replaces the browser with another Chromium build.

Ungoogled Chromium has no Web Store and does not update extensions, so extensions installs each one from a CRX file fetched at build time. An entry is keyed by the extension’s 32-letter ID and names the file’s url, its hash and the version in its manifest. Home Manager writes an external extension manifest pointing at the file in the store, and Chromium installs it at the next start. The list is empty by default.

othrys.apps.chromium.extensions.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = {
  url = "https://example.com/extensions/example-1.0.crx";
  hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
  version = "1.0";
};

The URL has to keep serving that exact file, or a build without a cached copy fails. A release asset or a versioned path does. A Web Store download link does not, since Google replaces the file with each new upload. An extension’s settings and logins live in the persisted profile and are not managed here.

With othrys.apps.floorp off, enabling Chromium also makes chromium the browser the compositors’ browser shortcut runs, as Desktop describes.

Options

  options.othrys.apps.chromium = {
    enable = lib.mkEnableOption "Ungoogled Chromium browser";

    package = lib.mkPackageOption pkgs "ungoogled-chromium" {
      extraDescription = "A replacement must support Home Manager's Chromium wrapper and use Chromium's profile directory layout.";
    };

    commandLineArgs = lib.mkOption {
      type = lib.types.listOf lib.types.str;
      default = [];
      example = ["--ozone-platform=wayland"];
      description = "Launch arguments passed through Home Manager's Chromium package wrapper. Empty leaves browser and GPU detection unchanged.";
    };

    extensions = lib.mkOption {
      type = lib.types.attrsOf extensionType;
      default = {};
      example = lib.literalExpression ''
        {
          aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = {
            url = "https://example.com/extensions/example-1.0.crx";
            hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
            version = "1.0";
          };
        }
      '';
      description = ''
        Extensions installed from local signed CRX files, keyed by their
        32-character IDs using the letters a through p. Each is fetched at
        build time from `url` and checked against `hash`, so the URL must keep
        serving that exact file. A release asset or a versioned path does, and
        a content delivery link that the publisher replaces on each upload
        does not.
      '';
    };
  };

VSCodium

othrys.apps.vscode.mutableExtensionsDir decides whether the editor can install extensions itself. With true, the default and Home Manager’s own, ~/.vscode-oss/extensions is a real directory. The extensions the configuration names are linked into it, and one installed by hand from Open VSX sits beside them, persists with .vscode-oss and updates itself. With false the directory is a link into the Nix store, so the editor runs exactly the set the configuration names and an install from the editor fails. A host that switches to false removes the existing directory first, since Home Manager does not replace a directory it did not create.

Language Toolchains (modules/apps/languages/)

othrys.apps.languages.<name>.enable is the one signal that a host develops in a language. Each entry holds a server, a formatter and a list of extraTools, and enabling it installs all three on the primary user’s PATH. Nixvim and VSCodium read the same entry, so neither editor carries a toolchain of its own.

LanguageServerFormatterExtra tools
bashbash-language-servershfmtshellcheck
gogoplsgofmt from go
javanonegoogle-java-formatjdk21, maven, gradle
jsonvscode-langservers-extractedprettier
lualua-language-serverstylua
nixnilalejandra
pythonbasedpyrightruff
rustrust-analyzerrustfmt
typescripttypescript-language-serverprettiertypescript
yamlyaml-language-serverprettier

JSON and YAML are entries of their own. A host that edits YAML without writing TypeScript enables yaml alone, and enabling typescript configures neither of them.

Overriding a tool

Both editors name the registry package by its store path, so an override reaches them and the PATH together.

othrys.apps.languages.nix = {
  enable = true;
  formatter = pkgs.nixfmt;
};

Nixvim formats through conform.nvim, which keeps a definition with the right arguments for each formatter it knows. The module selects that definition by the executable name of the package and sets its command to the store path. The override above therefore runs under conform’s nixfmt definition and not under the alejandra one with a different binary behind it. A tool conform has no definition for is run with no arguments and the buffer on stdin. Two languages whose formatters share an executable name share one definition, so typescript, json and yaml must hold the same prettier package or evaluation reports the conflicting commands.

VSCodium takes a binary only where an extension has a setting for one. The table shows what each extension reads from the registry.

LanguageFrom the registryBundled by the extension or the editor
bashshfmt, shellcheckbash-language-server
gogopls, the formatter
javajdtls
jsonprettierthe JSON language service
lualua-language-serverformatting, done by the server
nixnil, the formatter
pythonruffbasedpyright
rustrust-analyzer
typescriptprettierthe TypeScript language service
yamlprettieryaml-language-server

The bash extensions read shellcheck out of extraTools, found by its executable name. A host that removes it from the list gets no shellcheck path in either extension. The prettier and ruff settings apply only while the formatter is still that tool, since each extension can drive nothing else. A host that replaces one of them also chooses its own editor.defaultFormatter through othrys.apps.vscode.userSettings.

A language with no server

server accepts null, and java ships that way. An editor then configures no external server for the language. Nixvim enables no LSP client for it, while VSCodium omits the server path and the extension runs whatever it bundles. For Nix the extension has no bundled server, so the language server is switched off and formatting continues to work.

See also: Gaming, AI Assistants

For the anatomy of a fully-featured module, see the login manager example in Module System.