Skip to content
temidaradev edited this page Nov 30, 2026 · 1 revision

Run directly without installing:

nix run github:temidaradev/kopuz

On Linux that is Kopuz with kopuzd; github:temidaradev/kopuz#kopuz-legacy is Kopuz Legacy, which is also the default on macOS.

Install to your profile:

nix profile add github:temidaradev/kopuz

On NixOS, using the flake:

Tip

This is recommended over nix profile as it installs Kopuz as a proper system app with icon & .desktop entry.

Add Kopuz to your flake.nix inputs:

{
  inputs.kopuz.url = "github:temidaradev/kopuz";
}

Then pass it through to your system config and add the Cachix substituter so it downloads the pre-built binary instead of compiling:

{
  nix.settings = {
    substituters      = ["https://kopuz.cachix.org" ];
    trusted-public-keys = ["kopuz.cachix.org-1:J2X3AnAYhKTJW5S3aCLoA1ckonQXVNZMQvhZA0YAufw="];
  };
}

Then install the package:

{pkgs, kopuz, ...}: let
  kopuzPkg = kopuz.packages.${pkgs.stdenv.hostPlatform.system}.default

in {
  environment.systemPackages = [kopuzPkg];
}

Declarative configuration (hjem)

Kopuz reads its settings from ~/.config/kopuz/settings.toml, so you can manage them declaratively by linking that file with hjem:

{
  hjem.users.alice.files.".config/kopuz/settings.toml".source =
    (pkgs.formats.toml {}).generate "kopuz-settings.toml" {
      theme = "gruvbox";
      language = "en";
      crossfade_seconds = 3;
      equalizer.enabled = true;
    };
}

Or inline, without the pkgs.formats helper:

{
  hjem.users.alice.files.".config/kopuz/settings.toml".text = ''
    theme = "gruvbox"
    language = "en"
    crossfade_seconds = 3

    [equalizer]
    enabled = true
  '';
}

hjem links the file out of the Nix store, and Kopuz detects that it is immutable (a store symlink or read-only) and never writes to it. If Kopuz has already run once, remove the settings.toml it wrote (or turn on hjem's clobber option) so activation can replace it with the link. Keys you set there always win and show up grayed out in the settings UI; everything you leave out remains freely changeable in-app (runtime state keeps persisting in kopuz.db).

To try config changes without a rebuild, use either of the ad-hoc override layers, both of which out-rank settings.toml:

  • Drop-ins: any *.toml in ~/.config/kopuz/settings.d/, applied in lexicographic order.
  • Environment variables: KOPUZ_CONFIG_<FIELD>=value, e.g. KOPUZ_CONFIG_THEME=nord kopuz. Field names match settings.toml keys uppercased; nest tables with __ (KOPUZ_CONFIG_EQUALIZER__ENABLED=true). Values are parsed as TOML (3, true, ["/a", "/b"]), falling back to plain strings.

KOPUZ_CONFIG_PATH relocates the settings file itself.

Clone this wiki locally