1
0
mirror of https://github.com/kmein/niveum synced 2026-03-18 11:01:07 +01:00
Files
niveum/configs/todo-txt.nix

25 lines
651 B
Nix
Raw Normal View History

2019-06-08 15:01:41 +02:00
{ pkgs, ... }:
2020-01-03 12:01:32 +01:00
let
get-todo-dir = pkgs.writers.writeDash "git-toplevel-todo" ''
2020-01-25 18:26:25 +01:00
if GIT_TOPLEVEL=$(${pkgs.git}/bin/git rev-parse --show-toplevel 2>/dev/null); then
2020-01-03 12:01:32 +01:00
echo "$GIT_TOPLEVEL/.todo"
else
echo "$HOME/cloud/Dropbox/todo"
fi
'';
in {
home-manager.users.me.home.file.".todo/config".text = ''
2020-01-03 12:01:32 +01:00
export TODO_DIR="$(${get-todo-dir})"
2019-06-08 15:01:41 +02:00
2020-01-03 12:01:32 +01:00
export TODO_FILE="$TODO_DIR/todo.txt"
export DONE_FILE="$TODO_DIR/done.txt"
export REPORT_FILE="$TODO_DIR/report.txt"
'';
2019-06-08 15:01:41 +02:00
environment = {
systemPackages = [ pkgs.todo-txt-cli ];
shellAliases.t = "todo.sh";
2019-06-08 15:01:41 +02:00
variables.TODOTXT_DEFAULT_ACTION = "ls";
};
}