Difference between revisions of "Anki"

From NixOS Wiki
Jump to: navigation, search
(Add instructions on how to install anki addons)
m (Fixed formatting for first code snippet in installing addons section, capitalize headings, add 'Configuring Addons' heading)
Line 14: Line 14:
 
<code>$ nix-shell -p anki-bin</code>
 
<code>$ nix-shell -p anki-bin</code>
  
== Installing addons ==
+
== Installing Addons ==
 
Additional addons can be installed using the following syntax:
 
Additional addons can be installed using the following syntax:
  
Line 20: Line 20:
 
  environment.systemPackages = [
 
  environment.systemPackages = [
 
   (pkgs.anki.withAddons [
 
   (pkgs.anki.withAddons [
      pkgs.ankiAddons.passfail2
+
    pkgs.ankiAddons.passfail2
    ])
+
  ])
 
  ];
 
  ];
  
 +
=== Configuring Addons ===
 
Addons can be configured using <code>.withConfig</code>:
 
Addons can be configured using <code>.withConfig</code>:
  

Revision as of 19:12, 1 August 2025

Anki is a spaced repetition system (SRS) commonly used to learn new languages. Information is placed on individual flashcards, which are sorted into decks. Anki is extensible using Python addons.

In addition to the desktop software, Anki has an iOS app, Android app, and web interface available. Decks/flashcards can be synced using a self hosted instance of anki-sync-server or an AnkiWeb account.

Installation

anki-bin is recommended over anki, due to anki being out of date (at the time of writing). Using old versions of anki may lead to decks being incompatible with newer versions.

NixOs
environment.systemPackages = [
  pkgs.anki-bin
];
nix-shell

$ nix-shell -p anki-bin

Installing Addons

Additional addons can be installed using the following syntax:

NixOs
environment.systemPackages = [
  (pkgs.anki.withAddons [
    pkgs.ankiAddons.passfail2
  ])
];

Configuring Addons

Addons can be configured using .withConfig:

NixOs
environment.systemPackages = [
  (pkgs.anki.withAddons [
    (pkgs.ankiAddons.passfail2.withConfig {
      config = {
        again_button_name = "Incorrect";
        good_button_name = "Correct";
      };
    })
  ])
];