mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
fix(todo.txt): correctly set TODO_DIR
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
let todo-txt-config = pkgs.writeText "todo.cfg" ''
|
||||
export TODO_DIR="$(echo "$(${pkgs.git}/bin/git rev-parse --show-toplevel 2>/dev/null)/.todo" || echo "$HOME/cloud/Dropbox/todo")"
|
||||
let
|
||||
get-todo-dir = pkgs.writers.writeDash "git-toplevel-todo" ''
|
||||
if GIT_TOPLEVEL=$(${pkgs.git}/bin/git rev-parse --show-toplevel); then
|
||||
echo "$GIT_TOPLEVEL/.todo"
|
||||
else
|
||||
echo "$HOME/cloud/Dropbox/todo"
|
||||
fi
|
||||
'';
|
||||
todo-txt-config = pkgs.writeText "todo.cfg" ''
|
||||
export TODO_DIR="$(${get-todo-dir})"
|
||||
|
||||
export TODO_FILE="$TODO_DIR/todo.txt"
|
||||
export DONE_FILE="$TODO_DIR/done.txt"
|
||||
export REPORT_FILE="$TODO_DIR/report.txt"
|
||||
'';
|
||||
export TODO_FILE="$TODO_DIR/todo.txt"
|
||||
export DONE_FILE="$TODO_DIR/done.txt"
|
||||
export REPORT_FILE="$TODO_DIR/report.txt"
|
||||
'';
|
||||
in {
|
||||
environment = {
|
||||
systemPackages = [ pkgs.todo-txt-cli ];
|
||||
|
||||
Reference in New Issue
Block a user