feat(user/malte): new note-taking approach
This commit is contained in:
parent
ac4ceae896
commit
25439810cd
|
@ -115,7 +115,7 @@ in {
|
|||
./mpv.nix
|
||||
./broot.nix
|
||||
./hypr.nix
|
||||
./nb.nix
|
||||
./notes.nix
|
||||
../modules/restic-backup.nix
|
||||
../modules/colors.nix
|
||||
../modules/profiles-cleanup.nix
|
||||
|
|
|
@ -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
18
users/malte/notes.nix
Normal 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];
|
||||
}
|
Loading…
Reference in a new issue