feat(reference-manager): replace 'Zotero' with 'papis'
check / lint (push) Successful in 6s

This commit is contained in:
hektor committed 2026-11-08 20:33:53 +01:00
1 parent ed5bc2e303
commit 2b6f933673
7 files changed
+79 -181

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
{ config, lib, ... }:
let
inherit (config.host) username;
home = config.users.users.${username}.home;
devices = builtins.attrNames (import ../syncthing/devices.nix);
in
{
options.readings = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
path = lib.mkOption {
default = "${home}/doc/readings";
type = lib.types.str;
};
peers = lib.mkOption {
type = lib.types.nonEmptyListOf (lib.types.enum devices);
};
};
config = lib.mkIf config.readings.enable {
assertions = [
{
assertion = !builtins.elem config.host.name config.readings.peers;
message = "'readings.peers' for ${config.host.name} should not include '${config.host.name}'.";
}
];
syncthing = {
enable = true;
folders.readings = {
inherit (config.readings) path;
devices = config.readings.peers;
};
};
home-manager.sharedModules = [
{
readings.path = lib.mkDefault config.readings.path;
}
];
};
}