feat: declare anki config

This commit is contained in:
2025-12-14 22:44:45 +01:00
parent b8b7f6bce7
commit f8bac5414b
4 changed files with 35 additions and 19 deletions

30
flake.lock generated
View File

@@ -29,11 +29,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1765166690,
"narHash": "sha256-R3IuQUCRKilXeCwhtc8V443zRt7CIVewQ2Oa5LoXsnw=",
"lastModified": 1765685099,
"narHash": "sha256-D4VYn8NN0sLOzoo4geYDiV/T/Ilor78CaS50gNq6Ep0=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "74c67b60a15ff1a55208bdd1788a5cd4bcb7481a",
"rev": "51712b3d3481dfaeef9a5f8b293ea1aa04a61cdb",
"type": "gitlab"
},
"original": {
@@ -68,11 +68,11 @@
]
},
"locked": {
"lastModified": 1765217760,
"narHash": "sha256-BVVyAodLcAD8KOtR3yCStBHSE0WAH/xQWH9f0qsxbmk=",
"lastModified": 1765682243,
"narHash": "sha256-yeCxFV/905Wr91yKt5zrVvK6O2CVXWRMSrxqlAZnLp0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e5b1f87841810fc24772bf4389f9793702000c9b",
"rev": "58bf3ecb2d0bba7bdf363fc8a6c4d49b4d509d03",
"type": "github"
},
"original": {
@@ -84,10 +84,10 @@
"nix-secrets": {
"flake": false,
"locked": {
"lastModified": 1764371082,
"narHash": "sha256-yxFxEKXFuXFyFIDZY1gla2OyuqcIE3uT8KDDgTmm3cE=",
"lastModified": 1765747965,
"narHash": "sha256-EHZRRC3piD6vKd4hXiqC+CcDUQCOzrH/CNAF9zBqpDQ=",
"ref": "main",
"rev": "b9c2ce32cc4c95d7ff01372faea2668407ef8d27",
"rev": "a8e8d953f579939bd72b5f5c6ed332910b598554",
"shallow": true,
"type": "git",
"url": "ssh://git@github.com/hektor/nix-secrets"
@@ -153,11 +153,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1764950072,
"narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=",
"lastModified": 1765472234,
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f61125a668a320878494449750330ca58b78c557",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
"type": "github"
},
"original": {
@@ -340,11 +340,11 @@
]
},
"locked": {
"lastModified": 1765079830,
"narHash": "sha256-i9GMbBLkeZ7MVvy7+aAuErXkBkdRylHofrAjtpUPKt8=",
"lastModified": 1765684837,
"narHash": "sha256-fJCnsYcpQxxy/wit9EBOK33c0Z9U4D3Tvo3gf2mvHos=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "aeb517262102f13683d7a191c7e496b34df8d24c",
"rev": "94d8af61d8a603d33d1ed3500a33fcf35ae7d3bc",
"type": "github"
},
"original": {

View File

@@ -13,6 +13,10 @@
inherit config;
inherit pkgs;
})
(import ../../modules/anki.nix {
inherit config;
inherit pkgs;
})
];
programs.taskwarrior.config.recurrence = lib.mkForce "on";

View File

@@ -1,6 +1,16 @@
{ config, pkgs, ... }:
{
programs.anki = {
enable = true;
# sync = {
# username = config.sops.secrets."email/personal".path;
# };
addons = with pkgs.ankiAddons; [
anki-connect
puppy-reinforcement
review-heatmap
];
sync = {
usernameFile = "${config.sops.secrets."anki_sync_user".path}";
keyFile = "${config.sops.secrets."anki_sync_key".path}";
};
};
}

View File

@@ -27,6 +27,8 @@ in
"taskwarrior_sync_encryption_secret".owner = config.users.users.${cfg.username}.name;
"email_personal".owner = config.users.users.${cfg.username}.name;
"email_work".owner = config.users.users.${cfg.username}.name;
"anki_sync_user".owner = config.users.users.${cfg.username}.name;
"anki_sync_key".owner = config.users.users.${cfg.username}.name;
};
templates."taskrc.d/sync" = {