Add todo
script
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
9ed2ad3390
commit
0495a96ef0
1 changed files with 28 additions and 0 deletions
28
modules/scripts/todo.nix
Normal file
28
modules/scripts/todo.nix
Normal file
|
@ -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";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue