From 0495a96ef0d53dbbe053ae9cabee9f5e6261ff70 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 21 Sep 2025 21:56:25 +0100 Subject: [PATCH] Add `todo` script Signed-off-by: Oliver Davies --- modules/scripts/todo.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/scripts/todo.nix diff --git a/modules/scripts/todo.nix b/modules/scripts/todo.nix new file mode 100644 index 00000000..f7b06640 --- /dev/null +++ b/modules/scripts/todo.nix @@ -0,0 +1,28 @@ +{ withSystem, ... }: + +let + name = "todo"; +in +{ + perSystem = + { pkgs, ... }: + { + packages.${name} = pkgs.writeShellApplication { + inherit name; + + runtimeInputs = with pkgs; [ coreutils ]; + + text = ''"$EDITOR" "$TODO_FILE"''; + }; + }; + + flake.modules.homeManager.base = + { config, pkgs, ... }: + { + home.packages = [ + (withSystem pkgs.system (psArgs: psArgs.config.packages.${name})) + ]; + + home.sessionVariables.TODO_FILE = "${config.xdg.userDirs.documents}/todo.adoc"; + }; +}