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

Installation and requirements

What you need

  • NixOS on x86_64 or aarch64. The package is built for x86_64-linux and aarch64-linux.
  • A flake-based system configuration in a local folder: a flake.nix that defines nixosConfigurations.<hostname> for this machine. /etc/nixos is the default; any folder works, for example one in your home folder.
  • git, if your flake is a git repository. Flakes only see files that git tracks, so the app marks the generated files for git (see Reviewing and applying). The package brings its own git and curl for this and for update checks.
  • A way to get administrator rights for applying: a setuid pkexec (on NixOS this comes with polkit), otherwise run0, otherwise sudo. See Privacy and security.
  • nh (programs.nh.enable = true;). With nh you get Review and apply (a summary of what changes before switching, with a confirmation), and nh is also used for switching generations and for Cleanup. Without nh the app builds with nixos-rebuild, switches generations through its own helper and cleans up with nix-collect-garbage. The Actions page recommends installing nh when it is missing.

Optional

  • nvd: used by Generations → Compare when installed; otherwise the app uses nix store diff-closures.
  • nix-index: Packages → Search by command uses nix-locate. If it is not installed, the app builds it from your system’s nixpkgs when needed. The command database itself can be downloaded from the Packages page.
  • QEMU: Actions → Start in VM uses qemu-system-<arch> (for example qemu-system-x86_64) when it is installed; otherwise it is built from your system’s nixpkgs the first time.
  • A terminal emulator (for example Konsole): Try it opens command-line tools in a terminal, and opening a file in a terminal editor ($VISUAL or $EDITOR) needs one too.
  • Home Manager as a NixOS module, if you want to change Home Manager settings (see Home Manager).

Getting the package

The repository is a flake whose output packages.<system>.default is the app. It contains three programs:

  • drakeflake: the app, with a menu entry called DrakeFlake (category System),
  • drakeflake-tray: the small tray icon that checks for updates (see Flake inputs),
  • drakeflake-helper: the helper that does the few things that need root. It is not put on your PATH; the app runs it through pkexec (or run0 or sudo).

Install it system-wide

Add the repository as an input of your system flake and the package to environment.systemPackages. Use the URL you got this repository from:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    drakeflake.url = "gitlab:garuda-linux%252Fapplications/drakeflake";
  };

  outputs = { nixpkgs, drakeflake, ... }: {
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./configuration.nix
        (
          { pkgs, ... }:
          {
            environment.systemPackages = [
              drakeflake.packages.${pkgs.stdenv.hostPlatform.system}.default
            ];
          }
        )
      ];
    };
  };
}

Installing it system-wide also installs the app’s polkit actions (share/polkit-1/actions/org.garuda.drakeflake.policy), which give the password prompts a clear description and let polkit remember your password for a short while when saving files. See Privacy and security.

Try it from a checkout

To run the app without installing it, run this in a checkout of the repository:

nix run .

The app works the same way, but because its polkit actions are not installed, the password prompts are the generic ones of pkexec.