feat(anki): init
This commit is contained in:
33
modules/home/users/crumb/anki.nix
Normal file
33
modules/home/users/crumb/anki.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.sydnix.users.crumb.anki;
|
||||
in {
|
||||
options.sydnix.users.crumb.anki = {
|
||||
enable = lib.mkEnableOption "Anki desktop";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sydnix.impermanence.directories = [
|
||||
".local/share/Anki2"
|
||||
];
|
||||
|
||||
sydnix.sops.secrets = {
|
||||
anki-sync-key = {};
|
||||
anki-username = {};
|
||||
};
|
||||
|
||||
programs.anki = {
|
||||
enable = true;
|
||||
addons = with pkgs.ankiAddons; [
|
||||
review-heatmap
|
||||
];
|
||||
sync = {
|
||||
autoSync = true;
|
||||
syncMedia = true;
|
||||
url = "https://anki.deertopia.net/";
|
||||
usernameFile = config.sops.secrets.anki-username.path;
|
||||
passwordFile = config.sops.secrets.anki-sync-key.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user