{ config, pkgs, ... }:
let
  tomlFormat = pkgs.formats.toml { };
in
{
  home.packages = with pkgs; [
    pijul
    nix-plugin-pijul
  ];

  home.file."${config.home.homeDirectory}/.config/pijul/config.toml".source =
    tomlFormat.generate "pijul-config"
      {
        colors = "always";
        pager = "auto";
        unrecord_changes = 1;

        author = {
          name = "marvin";
          full_name = "Marvin Roman";
          email = "marvin@colab.coop";
          key_path = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
        };

        ignore_kinds = {
          default = [
            ".git"
            ".jj"
            ".pijul"
          ];
          suite = [
            ".git"
            ".jj"
            ".pijul"
            "node_modules"
          ];
        };
      };
}