Skip to content

Commit

Permalink
feat(zotero): add zotero home-manager module
Browse files Browse the repository at this point in the history
Zotero is based on Firefox and offers a rich selection of add-ons.
Providing add-ons was a manual process, and it was not possible to share settings.
Created a Zotero module, inspired by `home-manager`'s `programs.firefox` module,
that allows for declarative configuration and addon management.
  • Loading branch information
misumisumi committed Jul 19, 2024
1 parent eea3eb8 commit 633834b
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 29 deletions.
1 change: 0 additions & 1 deletion apps/user/full/pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
yabridge # A modern and transparent way to use Windows VST2 and VST3 plugins on Linux
yabridgectl # A modern and transparent way to use Windows VST2 and VST3 plugins on Linux
zoom-us # video conferencing app
zotero # Paper managiment tool
];
};
}
1 change: 1 addition & 0 deletions apps/user/full/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
./spicetify.nix
./vivaldi.nix
./zathura.nix
./zotero.nix
]
19 changes: 19 additions & 0 deletions apps/user/full/programs/zotero.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ pkgs, user, ... }:
{
programs.zotero = {
enable = true;
profiles."${user}" = {
settings = {
"extensions.zotero.ZoteroPDFTranslate.dictSource" = "webliodict";
"extensions.zotero.ZoteroPDFTranslate.targetLanguage" = "ja";
"extensions.zotero.ZoteroPDFTranslate.translateSource" = "googleapi";
};
extensions = with pkgs.zotero-addons; [
zotero-better-bibtex
zotero-night
zotero-pdf-translate
zotero-zotfile
];
};
};
}
40 changes: 13 additions & 27 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@

inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
flakes.url = "github:misumisumi/flakes";
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
nur.url = "github:nix-community/NUR";
flakes = {
url = "github:misumisumi/flakes";
inputs.nixpkgs.follows = "nixpkgs";
};
nvimdots = {
url = "github:misumisumi/nvimdots";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down Expand Up @@ -78,6 +81,7 @@
homeManagerModules = {
dotfiles = import ./modules/home-manager/dotfiles.nix;
zinit = import ./modules/home-manager/zinit.nix;
zotero = import ./modules/home-manager/zotero.nix;
};
nixosModules = {
vfio = import ./modules/nixos/vfio.nix;
Expand Down
1 change: 1 addition & 0 deletions machines/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ let
inputs.spicetify-nix.homeManagerModules.default
self.homeManagerModules.dotfiles
self.homeManagerModules.zinit
self.homeManagerModules.zotero
];
users."${user}" = {
dotfilesActivation = true;
Expand Down
1 change: 1 addition & 0 deletions machines/home-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ let
inputs.nvimdots.homeManagerModules.nvimdots
self.homeManagerModules.dotfiles
self.homeManagerModules.zinit
self.homeManagerModules.zotero
({ config, ... }: {
imports = [
../settings/user/nix
Expand Down
Loading

0 comments on commit 633834b

Please sign in to comment.