feat(user/malte): new note-taking approach

This commit is contained in:
Malte Tammena 2024-02-23 20:38:51 +01:00
parent ac4ceae896
commit 25439810cd
3 changed files with 19 additions and 34 deletions

View file

@ -115,7 +115,7 @@ in {
./mpv.nix ./mpv.nix
./broot.nix ./broot.nix
./hypr.nix ./hypr.nix
./nb.nix ./notes.nix
../modules/restic-backup.nix ../modules/restic-backup.nix
../modules/colors.nix ../modules/colors.nix
../modules/profiles-cleanup.nix ../modules/profiles-cleanup.nix

View file

@ -1,33 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
toEnvFile = attrs: lib.strings.concatLines (lib.attrsets.mapAttrsToList (key: value: "${key}=${builtins.toString value}") attrs);
in {
home.packages = [
pkgs.nb
pkgs.nmap
pkgs.w3m
pkgs.joshuto
pkgs.pandoc
];
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";
};
}

18
users/malte/notes.nix Normal file
View file

@ -0,0 +1,18 @@
{pkgs, ...}: let
note = pkgs.writeShellApplication {
name = "note";
runtimeInputs = [
pkgs.helix
pkgs.coreutils
pkgs.marksman
];
text = ''
year=$(date +"%Y")
pushd "$XDG_DATA_HOME/life.md"
hx "$year.md" +99999
popd
'';
};
in {
home.packages = [note];
}