nix-config/modules/scripts/todo.nix
Oliver Davies 630ebed658
All checks were successful
/ check (push) Successful in 1m30s
Rename wiki to notes
2025-09-30 22:56:22 +01:00

33 lines
673 B
Nix

{ withSystem, ... }:
let
name = "todo";
in
{
perSystem =
{ pkgs, ... }:
{
packages.${name} = pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; [ coreutils ];
text = ''
"$EDITOR" +3 "$TODO_FILE"
git add "$TODO_FILE"
git commit -m "Update TODOs"
git push
'';
};
};
flake.modules.homeManager.base =
{ config, pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
home.sessionVariables.TODO_FILE = "${config.home.sessionVariables.NOTES_DIRECTORY}/todo.adoc";
};
}