feat(user/malte): add nb for notetaking

This commit is contained in:
Malte Tammena 2023-11-10 20:59:20 +01:00
parent ca00aa5274
commit 0d1998361f
2 changed files with 30 additions and 0 deletions

View file

@ -58,6 +58,7 @@ in {
./mpv.nix
./broot.nix
./hypr.nix
./nb.nix
../modules/restic-backup.nix
../modules/synchronize-calendars.nix
../modules/protonmail-bridge.nix

29
users/malte/nb.nix Normal file
View file

@ -0,0 +1,29 @@
{
config,
pkgs,
lib,
...
}: let
toEnvFile = attrs: lib.strings.concatLines (lib.attrsets.mapAttrsToList (key: value: "${key}=${builtins.toString value}") attrs);
in {
home.packages = [
pkgs.nb
];
home.sessionVariables = {
NBRC_PATH = "${config.xdg.configHome}/nb/nbrc";
};
xdg.configFile."nb/nbrc".text = toEnvFile {
NB_DIR = "${config.xdg.dataHome}/nb";
NB_ENCRYPTION_TOOL = "gpg";
# NB_SYNTAX_THEME="gruvbox-dark";
NB_COLOR_PRIMARY = 3;
NB_COLOR_SECONDARY = 5;
NB_ACE_ENABLED = "1";
NB_IMAGE_TOOL = "${pkgs.timg}/bin/timg";
NB_MARKDOWN_TOOL = "${pkgs.mdcat}/bin/mdcat";
};
}